From 333d770c0da1988d8fa7baf1527ffe889ea1f4f1 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 24 Jul 2021 16:44:41 +0100 Subject: [PATCH] Use Pick instead of listing out fields. --- src/routes/servers.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/routes/servers.ts b/src/routes/servers.ts index c3fb959..2b326b8 100644 --- a/src/routes/servers.ts +++ b/src/routes/servers.ts @@ -301,24 +301,15 @@ resource('/servers/:server/bans', { ...serverParams, ...await success("Bans", schema` import type { Id } from './_common'; + import type { User } from './Users'; import type { Ban } from './Servers'; - import type { Username } from './Users'; import type { Attachment } from './Autumn'; type ${'ServerBans'} = { /** * Just enough user information to list bans. */ - users: { - /** - * User Id - */ - _id: Id; - - username: Username; - - avatar?: Attachment; - }[] + users: Pick[] /** * Ban List