feature:
修改账号接口返回结构 修改部分账号接口逻辑
This commit is contained in:
@@ -3,6 +3,9 @@ import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop } from '@typegoose/typegoose';
|
||||
|
||||
class ServerInfo {
|
||||
@prop({ required: true })
|
||||
id: number;
|
||||
|
||||
@prop({ required: true })
|
||||
name: string;
|
||||
|
||||
@@ -55,7 +58,7 @@ export default class Game extends BaseModel {
|
||||
public static async getServerListByType(serverType: string) {
|
||||
let game = await GameModel.findOne().lean();
|
||||
if (!game) {
|
||||
const serverInfo: ServerInfo = { name: '常山少年', host: 'pinus_test.trgame.cn', port: 3014, status: 1, createTime: new Date(), serverType: 'official' };
|
||||
const serverInfo: ServerInfo = { id: 1, name: '常山少年', host: 'pinus_test.trgame.cn', port: 3014, status: 1, createTime: new Date(), serverType: 'official' };
|
||||
const iconUrl = `https://download.tgamebox.cn/avatar/${APP_ID}/1.png`;
|
||||
game = await GameModel.findOneAndUpdate(
|
||||
{},
|
||||
|
||||
Reference in New Issue
Block a user