mirror of
https://github.com/stoatchat/javascript-client-api.git
synced 2026-07-21 04:25:22 -04:00
Use Pick<User> instead of listing out fields.
This commit is contained in:
+2
-11
@@ -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<User, '_id' | 'username' | 'avatar'>[]
|
||||
|
||||
/**
|
||||
* Ban List
|
||||
|
||||
Reference in New Issue
Block a user