feat: add guilds and channels CRUD (#14)

This commit is contained in:
Divlo
2022-03-05 18:22:30 +01:00
committed by GitHub
parent 9f56a10305
commit 780788d682
50 changed files with 6459 additions and 9039 deletions

View File

@ -0,0 +1,14 @@
import { Handler } from '../../handler'
import { channelExample, channelExample2 } from '../channel'
export const deleteChannelWithChannelIdHandler: Handler = {
method: 'DELETE',
url: `/channels/${channelExample.id}`,
response: {
statusCode: 200,
body: {
...channelExample,
defaultChannelId: channelExample2.id
}
}
}

View File

@ -1,5 +1,5 @@
import { Handler } from '../../handler'
import { channelExample } from '../channel'
import { channelExample, channelExample2 } from '../channel'
export const getChannelWithChannelIdHandler: Handler = {
method: 'GET',
@ -11,3 +11,14 @@ export const getChannelWithChannelIdHandler: Handler = {
}
}
}
export const getChannelWithChannelIdHandler2: Handler = {
method: 'GET',
url: `/channels/${channelExample2.id}`,
response: {
statusCode: 200,
body: {
channel: channelExample2
}
}
}

View File

@ -0,0 +1,15 @@
import { Handler } from '../../handler'
import { channelExample, channelExample2 } from '../channel'
export const putChannelWithChannelIdHandler: Handler = {
method: 'PUT',
url: `/channels/${channelExample.id}`,
response: {
statusCode: 200,
body: {
...channelExample,
name: 'New channel name',
defaultChannelId: channelExample2.id
}
}
}