feat: interact with user settings/profile (#9)

This commit is contained in:
Divlo
2022-02-19 23:20:33 +01:00
committed by GitHub
parent 48debe8638
commit 7ac4f86cd5
101 changed files with 6705 additions and 9777 deletions

View File

@ -1,8 +1,10 @@
import { getUsersCurrentHandler } from './users/current/get'
import { postUsersRefreshTokenHandler } from './users/refresh-token/post'
export type Method = 'GET' | 'POST' | 'PUT' | 'DELETE'
export interface Handler {
method: 'GET' | 'POST' | 'PUT' | 'DELETE'
method: Method
url: `/${string}`
response: {
isFile?: boolean

View File

@ -0,0 +1,17 @@
import { Handler } from '../../handler'
import { userExample, userSettingsExample } from '../user'
export const getUserByIdHandler: Handler = {
method: 'GET',
url: `/users/${userExample.id}`,
response: {
statusCode: 200,
body: {
user: {
...userExample,
settings: userSettingsExample
},
guilds: []
}
}
}