Fixed 267U.pre2
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import define from "../../define.js";
|
||||
import { ReversiGames } from "../../../../models/index.js";
|
||||
import { checkCrc } from "../../../../services/reversi/index.js";
|
||||
export const meta = {
|
||||
tags: [
|
||||
"reversi"
|
||||
],
|
||||
requireCredential: false,
|
||||
res: {
|
||||
type: "object",
|
||||
optional: true,
|
||||
nullable: false
|
||||
}
|
||||
};
|
||||
export const paramDef = {
|
||||
type: "object",
|
||||
properties: {
|
||||
gameId: {
|
||||
type: "string",
|
||||
format: "misskey:id"
|
||||
},
|
||||
crc32: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "string"
|
||||
},
|
||||
{
|
||||
type: "number"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
required: [
|
||||
"gameId",
|
||||
"crc32"
|
||||
]
|
||||
};
|
||||
export default define(meta, paramDef, async (ps)=>{
|
||||
const game = await checkCrc(ps.gameId, ps.crc32);
|
||||
return game ? await ReversiGames.packDetail(game) : undefined;
|
||||
});
|
||||
Reference in New Issue
Block a user