修改默认错误格式
This commit is contained in:
parent
0a6cec4975
commit
a9c717a418
@ -133,7 +133,7 @@ export class ApiServer {
|
||||
this.server.addHook('preSerialization', async (request: FastifyRequest, reply: FastifyReply, payload) => {
|
||||
reply.header('X-Powered-By', 'PHP/5.4.16')
|
||||
// @ts-ignore
|
||||
if (!payload.code) {
|
||||
if (!payload.errcode) {
|
||||
payload = {
|
||||
errcode: 0,
|
||||
data: payload,
|
||||
|
Loading…
x
Reference in New Issue
Block a user