[api] implement invention cheers (#55)

Co-authored-by: Nexi (CWN) <communityshieldofficial@gmail.com>
This commit is contained in:
Nexi
2026-09-09 22:27:55 +01:00
committed by GitHub
parent 548089a3ec
commit 7add875223
5 changed files with 200 additions and 20 deletions
+7 -1
View File
@@ -598,7 +598,13 @@ export const InventionDetails = z.object({ Tags: z.array(InventionTagDto) })
/** `GET /api/inventions/v1/personaldetails/:id` — the caller's own relation to it. */
export const InventionPersonalDetails = z.object({
IsCheering: z.boolean().describe('Always false — nothing can cheer an invention yet'),
IsCheering: z.boolean().describe('Whether the caller currently cheers this invention'),
})
/** `POST /api/inventions/v1/cheer` JSON body. */
export const InventionCheerRequest = z.object({
InventionId: z.int().describe('The invention whose cheer state is changing'),
Cheer: z.boolean().describe('True to cheer; false to remove the cheer'),
})
/** `POST /api/inventions/v1/settags` JSON body — both lists are replaced wholesale. */