hirodesu85 / GIFTech2024_backend

0 stars 0 forks source link

行き先到着APIのロジック実装 #12

Closed ryichk closed 4 months ago

ryichk commented 5 months ago

APIの詳細:https://github.com/hirodesu85/GIFTech2024_backend/issues/7

行き先に到着したという情報の送信と報酬の受け渡しのAPI 髪型とかのアイテムと好感度の数値がレスポンス(好感度は反映後のもの)

URL

POST /api/places/arrive

レスポンス

形式はJSON

{
  "item": {
      "id": 123456,
      "category": "hairs",
      "name": "エメラルドグリーンのツインテール",
      "image_url": "https://sample.no.url.desu"
    },
  "rank": 5,
  "until_next_rank": 10084,
  "get_rank_point": 100
}

リクエスト

形式はJSON

{
  "place_id": "asdfghjkl",
  "distance": "near"
}

TODO

必要なモデル

beauty_girls

shoes

hair

tops

bottoms

Yoshino-Yukitaro commented 4 months ago

Q. seedでis_mineがリセットされてしまうのでは? A. 本番ではどうせリセットされていた方が嬉しいので良い(独断と偏見に基づく) そもそもリセットされない(初めて知った) https://railsguides.jp/active_record_migrations.html#%E3%83%87%E3%83%BC%E3%82%BF%E3%83%99%E3%83%BC%E3%82%B9%E3%82%92%E6%BA%96%E5%82%99%E3%81%99%E3%82%8B

Yoshino-Yukitaro commented 4 months ago

Cloud Storage米国じゃないと有料っぽいしダメそ 😇 大人しくCloudflare R2使う

スクリーンショット 2024-04-19 18 43 30
Yoshino-Yukitaro commented 4 months ago

🙏 🙏 🙏

スクリーンショット 2024-04-19 18 49 28