From 8e8459fa559865428963b08e6422fba9617240f5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 15 Nov 2020 12:34:47 +0900 Subject: wip: clip --- src/server/api/endpoints/clips/update.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/server/api/endpoints') diff --git a/src/server/api/endpoints/clips/update.ts b/src/server/api/endpoints/clips/update.ts index 483941214c..4a1a31eb95 100644 --- a/src/server/api/endpoints/clips/update.ts +++ b/src/server/api/endpoints/clips/update.ts @@ -18,6 +18,14 @@ export const meta = { name: { validator: $.str.range(1, 100), + }, + + isPublic: { + validator: $.optional.bool + }, + + description: { + validator: $.optional.nullable.str.range(1, 2048) } }, @@ -42,7 +50,9 @@ export default define(meta, async (ps, user) => { } await Clips.update(clip.id, { - name: ps.name + name: ps.name, + description: ps.description, + isPublic: ps.isPublic, }); return await Clips.pack(clip.id); -- cgit v1.2.3-freya