Add tag-adding logic
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
export { MEME_TYPE, memeTypePlural, Meme } from './meme';
|
||||
export { Tag } from './tag';
|
||||
export { Tag, deleteAllTags } from './tag';
|
||||
|
@@ -19,4 +19,10 @@ class Tag extends Realm.Object<Tag> {
|
||||
};
|
||||
}
|
||||
|
||||
export { Tag };
|
||||
const deleteAllTags = (realm: Realm) => {
|
||||
realm.write(() => {
|
||||
realm.delete(realm.objects<Tag>('Tag'));
|
||||
});
|
||||
};
|
||||
|
||||
export { Tag, deleteAllTags };
|
||||
|
Reference in New Issue
Block a user