Skip to content

Conversation

@Kubosaka
Copy link
Collaborator

対応Issue

resolve #0

概要

  • 購入報告ページで必要なAPIを実装しました
  • 作成したAPI
    • ユーザーIDを指定して、所属している部門を返すAPI
    • 部門IDを指定して、紐づく物品を返すAPI
  • 実装内容
    • OAS定義、コード生成
    • API実装

画面スクリーンショット等

スクリーンショット 2025-02-18 0 00 41
スクリーンショット 2025-02-18 0 00 56

テスト項目

  • swaggerでAPIを叩いて動作が問題ないか確認して下さい

備考

@Kubosaka Kubosaka self-assigned this Feb 17, 2025
@Kubosaka Kubosaka requested a review from hikahana February 17, 2025 15:01
Copy link
Collaborator

@hikahana hikahana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

動作良さ。
少しコメントしてます

func (d *divisionController) GetDivisionOptions(c echo.Context) error {
ctx := c.Request().Context()
year := c.QueryParam("year")
user_id := c.QueryParam("user_id")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
user_id := c.QueryParam("user_id")
userId := c.QueryParam("user_id")

キャメルケースにしてた気がします!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

year := c.QueryParam("year")
user_id := c.QueryParam("user_id")

divisionDetails, err := d.u.GetDivisionOptions(ctx, year, user_id)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

divisionOptions

がよさそう

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@hikahana hikahana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kubosaka Kubosaka merged commit ecb1e7b into develop Feb 24, 2025
2 checks passed
@Kubosaka Kubosaka deleted the feat/kubosaka/create-api-division-for-user branch February 24, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants