-
Notifications
You must be signed in to change notification settings - Fork 1
openapiでhandler自動生成 #918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
openapiでhandler自動生成 #918
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
タイポだけ見た
func (h *Handler) PostActivities(c echo.Context) error { | ||
activities := new(domain.Activity) | ||
if err := c.Bind(activities); err != nil { | ||
fmt.Println("err") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これいらない。
fmt.Println("err") | ||
return err | ||
} | ||
latastActivity, err := h.activityUseCase.CreateActivity(c.Request().Context(), strconv.Itoa(int(activities.UserID)), strconv.FormatBool(activities.IsDone), strconv.Itoa(int(activities.SponsorID)), activities.Feature, strconv.Itoa(int(activities.Expense)), activities.Remark, strconv.Itoa(int(activities.Design)), activities.Url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
タイポ
latestActivity
idStr := strconv.Itoa(id) | ||
activities := new(domain.Activity) | ||
if err := c.Bind(activities); err != nil { | ||
fmt.Println("err") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これ要らない
return err | ||
} | ||
|
||
latastActivityStyle, err := h.activityStyleUseCase.CreateActivityStyle(c.Request().Context(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
タイポ
latestActivityStale
|
||
latastActivityStyle, err := h.activityStyleUseCase.CreateActivityStyle(c.Request().Context(), | ||
strconv.Itoa(int(activityStyle.ActivityID)), | ||
strconv.Itoa(int(activityStyle.SponsoStyleID)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SponsorStyleID
これdomainの変更必要かも。修正箇所たくさん!
return err | ||
} | ||
|
||
latastSponsor, err := h.sponsorUseCase.CreateSponsor(c.Request().Context(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latestSponsor
|
||
// router.GET(baseURL+"/sponsorstyles", wrapper.GetSponsorstyles) | ||
func (h *Handler) GetSponsorstyles(c echo.Context) error { | ||
sponsorstyles, err := h.sponsorStyleUseCase.GetSponsorStyles(c.Request().Context()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sponsorStyles
return err | ||
} | ||
|
||
latastSponsorstyle, err := h.sponsorStyleUseCase.CreateSponsorStyle(c.Request().Context(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latestSponsorStyle
) | ||
|
||
// router.GET(baseURL+"/sponsorstyles", wrapper.GetSponsorstyles) | ||
func (h *Handler) GetSponsorstyles(c echo.Context) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これパスカルケースで出力とかできないのかな
name := params.Name | ||
bureauID := strconv.Itoa(params.BureauId) | ||
roleID := strconv.Itoa(params.RoleId) | ||
latastUser, err := h.userUseCase.CreateUser(c.Request().Context(), name, bureauID, roleID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latestUser
対応Issue
概要
画面スクリーンショット等
URL
スクリーンショット
テスト項目
備考