Closed yudaisugiyama closed 10 months ago
@umaidashi postの方のdataのtype. これでわかるかな..準備できてなくてすみません.
{
“type”: “object”,
“properties”: {
“baseStats”: {
“type”: “object”,
“properties”: {
“hp”: { “type”: “integer” },
“attack”: { “type”: “integer” },
“defense”: { “type”: “integer” },
“specialAttack”: { “type”: “integer” },
“specialDefense”: { “type”: “integer” },
“speed”: { “type”: “integer” }
},
“required”: [“hp”, “attack”, “defense”, “specialAttack”, “specialDefense”, “speed”]
},
“userName”: { “type”: “string” },
“pokemonID”: { “type”: “integer” },
“color”: {
“type”: “object”,
“properties”: {
“fillColor”: { “type”: “string” },
“lineColor”: { “type”: “string” }
},
“required”: [“fillColor”, “lineColor”]
}
},
“required”: [“baseStats”, “userName”, “pokemonID”, “color”]
}
@yudaisugiyama 型情報ありがとうございます!! pythonのオブジェクトですよね?
bodyの形に直したら↓になりますか??
const body = {
"baseStats": {
“hp”: 100,
“attack”: 100,
“defense”: 100,
“specialAttack”: 100,
“specialDefense”: 100,
“speed”: 100,
},
"useName": "umaidashi",
"pokemonID": 1,
}
colorはmongoDBに持ってないって話でしたっけ??
get.tsで書いてた処理だけどコンフリクトしそうなのでapiRequest.tsを新しく作りました。get.tsのgetUrl()とpost.ts消して大丈夫です。
AWSのリージョン変更に伴ってAPI_KEYも変更しました。slackで再度共有いたします。
↓動作確認用コード