mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-16 12:51:39 +00:00
fix(shell): satori: server: fix routes
This commit is contained in:
parent
f4d5939565
commit
4af8985686
@ -52,11 +52,11 @@ export const apply = async (ctx: ChronocatContext) => {
|
||||
register('guild.member.list', buildGuildMemberList(ctx))
|
||||
register('guild.member.kick', buildGuildMemberKick(ctx))
|
||||
register('message.create', buildMessageCreate(ctx))
|
||||
register('chronocat.internal.message.create.forward', buildMessageCreate(ctx))
|
||||
register('message.get', buildMessageGet(ctx))
|
||||
register('message.delete', buildMessageDelete(ctx))
|
||||
register('message.list', buildMessageList(ctx))
|
||||
register('login.get', buildLoginGet(ctx))
|
||||
register('chronocat.internal.message.create.forward', buildMessageCreate(ctx))
|
||||
register('user.get', buildUserGet(ctx))
|
||||
register('friend.list', buildFriendList(ctx))
|
||||
register('friend.approve', buildFriendApprove(ctx))
|
||||
|
@ -10,8 +10,9 @@ export const guildMemberGet = async ({
|
||||
}: RouteContext) => {
|
||||
const payload = (await json()) as GuildMemberGetPayload
|
||||
|
||||
const validateResult =
|
||||
await cctx.chronocat.validate('ChannelMutePayload')(payload)
|
||||
const validateResult = await cctx.chronocat.validate('GuildMemberGetPayload')(
|
||||
payload,
|
||||
)
|
||||
|
||||
if (validateResult) {
|
||||
const err = `解析 ${path} 请求时出现问题,来自 ${req.socket.remoteAddress}。${validateResult}`
|
||||
|
@ -11,7 +11,7 @@ export const guildRemove = async ({
|
||||
const payload = (await json()) as GuildRemovePayload
|
||||
|
||||
const validateResult =
|
||||
await cctx.chronocat.validate('ChannelMutePayload')(payload)
|
||||
await cctx.chronocat.validate('GuildRemovePayload')(payload)
|
||||
|
||||
if (validateResult) {
|
||||
const err = `解析 ${path} 请求时出现问题,来自 ${req.socket.remoteAddress}。${validateResult}`
|
||||
|
@ -12,7 +12,7 @@ import { guildMemberGet } from './guild/member/get'
|
||||
import { guildMemberKick } from './guild/member/kick'
|
||||
import { guildMemberList } from './guild/member/list'
|
||||
import { guildRemove } from './guild/remove'
|
||||
// import { loginGet } from './login/get'
|
||||
import { loginGet } from './login/get'
|
||||
import { messageCreate } from './message/create'
|
||||
import { messageDelete } from './message/delete'
|
||||
import { messageGet } from './message/get'
|
||||
@ -45,7 +45,7 @@ const routesIntl = {
|
||||
'guild.role.create': notImplemented,
|
||||
'guild.role.update': notImplemented,
|
||||
'guild.role.delete': notImplemented,
|
||||
// 'login.get': loginGet,
|
||||
'login.get': loginGet,
|
||||
'message.create': messageCreate,
|
||||
'message.get': messageGet,
|
||||
'message.delete': messageDelete,
|
||||
|
Loading…
Reference in New Issue
Block a user