From ad1a77c81dc9f6f63cbf59358b6d65d4cb55b9bd Mon Sep 17 00:00:00 2001 From: Shikhar Soni Date: Fri, 5 Jan 2024 18:49:12 +0530 Subject: [PATCH] fix typo --- controllers/project_reg.go | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/controllers/project_reg.go b/controllers/project_reg.go index 3c0a193..eab03b5 100644 --- a/controllers/project_reg.go +++ b/controllers/project_reg.go @@ -33,23 +33,25 @@ type RegisterProjectReqFields struct { // RegisterProject godoc // -// @Summary Register a Project -// @Description Register a new project with the provided details. -// @Accept json -// @Produce json -// @Param request body RegisterProjoectReqFields true "Fields required for project registeration" -// @Success 200 {object} utils.HTTPMessage "Success." -// @Failure 401 {object} utils.HTTPMessage "Login username and mentor username do not match." -// @Failure 400 {object} utils.HTTPMessage "Error: Project `project` already exists." -// @Failure 400 {object} utils.HTTPMessage "Error decoding request JSON body." -// @Failure 400 {object} utils.HTTPMessage "Error: Mentor `mentor` does not exist." -// @Failure 400 {object} utils.HTTPMessage "Error: Secondary mentor `secondary_mentor` cannot be same as primary mentor." -// @Failure 500 {object} utils.HTTPMessage "Error fetching mentor `mentor`." -// @Failure 500 {object} utils.HTTPMessage "Error fetching secondary mentor `secondary_mentor`." -// @Failure 500 {object} utils.HTTPMessage "Error adding the project in the database." -// @Failure 500 {object} utils.HTTPMessage "Database error." -// @Security JWT -// @Router /project/ [post] +// @Summary Register a Project +// @Description Register a new project with the provided details. +// @Accept json +// @Produce json +// @Param request body RegisterProjectReqFields true "Fields required for project registeration" +// @Success 200 {object} utils.HTTPMessage "Success." +// @Failure 401 {object} utils.HTTPMessage "Login username and mentor username do not match." +// @Failure 400 {object} utils.HTTPMessage "Error: Project `project` already exists." +// @Failure 400 {object} utils.HTTPMessage "Error decoding request JSON body." +// @Failure 400 {object} utils.HTTPMessage "Error: Mentor `mentor` does not exist." +// @Failure 400 {object} utils.HTTPMessage "Error: Secondary mentor `secondary_mentor` cannot be same as primary mentor." +// @Failure 500 {object} utils.HTTPMessage "Error fetching mentor `mentor`." +// @Failure 500 {object} utils.HTTPMessage "Error fetching secondary mentor `secondary_mentor`." +// @Failure 500 {object} utils.HTTPMessage "Error adding the project in the database." +// @Failure 500 {object} utils.HTTPMessage "Database error." +// +// @Security JWT +// +// @Router /project/ [post] func RegisterProject(w http.ResponseWriter, r *http.Request) { app := r.Context().Value(middleware.APP_CTX_KEY).(*middleware.App) db := app.Db