Add photo upload as a real onboarding step
Photos are now step 2 of onboarding (right after basic info) instead of only being manageable from the profile page later. Uploading still goes through the existing /profile/photos endpoint; the new POST /onboarding/photos just confirms at least one photo exists and advances the step counter. Renumbered the OnboardingStep enum accordingly (9 steps total now). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -66,6 +66,19 @@ func (h *OnboardingHandler) BasicInfo(c *gin.Context) {
|
||||
utils.Success(c, http.StatusOK, "اطلاعات پایه ثبت شد", h.onboardingService.GetStatus(user))
|
||||
}
|
||||
|
||||
// Photos POST /onboarding/photos — تایید مرحلهی عکسها (خودِ آپلود از /profile/photos انجام میشه)
|
||||
func (h *OnboardingHandler) Photos(c *gin.Context) {
|
||||
user, ok := currentUser(c)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
if err := h.onboardingService.ConfirmPhotos(user); err != nil {
|
||||
h.handleStepError(c, err)
|
||||
return
|
||||
}
|
||||
utils.Success(c, http.StatusOK, "عکسها ثبت شد", h.onboardingService.GetStatus(user))
|
||||
}
|
||||
|
||||
// BodyInfo POST /onboarding/body-info
|
||||
func (h *OnboardingHandler) BodyInfo(c *gin.Context) {
|
||||
user, ok := currentUser(c)
|
||||
|
||||
Reference in New Issue
Block a user