feat: specify login organization

This commit is contained in:
Yaodong Yu
2023-05-27 19:02:54 +08:00
parent d04dd33d8b
commit 8ede4993af
23 changed files with 1210 additions and 573 deletions

View File

@ -148,3 +148,16 @@ func (c *ApiController) GetDefaultApplication() {
maskedApplication := object.GetMaskedApplication(application, userId)
c.ResponseOk(maskedApplication)
}
// GetOrganizationNames ...
// @Title GetOrganizationNames
// @Tag Organization API
// @Param owner query string true "owner"
// @Description get all organization names
// @Success 200 {array} object.Organization The Response object
// @router /get-organization-names [get]
func (c *ApiController) GetOrganizationNames() {
owner := c.Input().Get("owner")
organizationNames := object.GetOrganizationsByFields(owner, "name")
c.ResponseOk(organizationNames)
}