GetMemberRole godoc @Security ApiKey @Summary Get user's role in an org @Tags Member @Accept json @Produce json @Param namespace path string true "org name" @Param username path string true "user name" @Param current_user query string false "the op
(ctx *gin.Context)
| 203 | // @Failure 500 {object} types.APIInternalServerError "Internal server error" |
| 204 | // @Router /organization/{namespace}/members/{username} [get] |
| 205 | func (h *MemberHandler) GetMemberRole(ctx *gin.Context) { |
| 206 | org := ctx.Param("namespace") |
| 207 | userName := ctx.Param("username") |
| 208 | // Assuming GetMemberRole returns a role (or similar) and an error |
| 209 | role, err := h.c.GetMemberRole(ctx.Request.Context(), org, userName) |
| 210 | if err != nil { |
| 211 | httpbase.ServerError(ctx, err) |
| 212 | return |
| 213 | } |
| 214 | |
| 215 | httpbase.OK(ctx, role) |
| 216 | } |
nothing calls this directly
no test coverage detected