summaryrefslogtreecommitdiff
path: root/src/models/post.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/post.ts')
-rw-r--r--src/models/post.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/models/post.ts b/src/models/post.ts
index 798c18e4b1..2f2b51b946 100644
--- a/src/models/post.ts
+++ b/src/models/post.ts
@@ -11,6 +11,8 @@ import { pack as packFile } from './drive-file';
const Post = db.get<IPost>('posts');
+Post.createIndex('uri', { sparse: true, unique: true });
+
export default Post;
export function isValidText(text: string): boolean {
@@ -49,6 +51,7 @@ export type IPost = {
heading: number;
speed: number;
};
+ uri: string;
};
/**