From 75c4c844e6d679cd94da59525801fdd879e780c1 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 30 Mar 2018 11:24:07 +0900 Subject: cw --- src/models/post.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/models') diff --git a/src/models/post.ts b/src/models/post.ts index 833e599320..9bc0c1d3b9 100644 --- a/src/models/post.ts +++ b/src/models/post.ts @@ -18,6 +18,10 @@ export function isValidText(text: string): boolean { return text.length <= 1000 && text.trim() != ''; } +export function isValidCw(text: string): boolean { + return text.length <= 100 && text.trim() != ''; +} + export type IPost = { _id: mongo.ObjectID; channelId: mongo.ObjectID; @@ -27,6 +31,7 @@ export type IPost = { repostId: mongo.ObjectID; poll: any; // todo text: string; + cw: string; userId: mongo.ObjectID; appId: mongo.ObjectID; viaMobile: boolean; -- cgit v1.2.3-freya