Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Raajheer1 committed Oct 27, 2024
1 parent 9d87bc4 commit b211f8e
Show file tree
Hide file tree
Showing 43 changed files with 376 additions and 168 deletions.
78 changes: 45 additions & 33 deletions external/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4457,9 +4457,9 @@ const docTemplate = `{
}
}
},
"/user/{cid}/role": {
"post": {
"description": "Create a new user role",
"/user/{cid}/roles": {
"get": {
"description": "Get roles for the user logged in",
"consumes": [
"application/json"
],
Expand All @@ -4469,28 +4469,19 @@ const docTemplate = `{
"tags": [
"user-roles"
],
"summary": "Create a new user role",
"summary": "Get your roles",
"parameters": [
{
"type": "integer",
"description": "User CID",
"name": "cid",
"in": "path",
"required": true
},
{
"description": "User Role",
"name": "user_role",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user_role.Request"
}
}
],
"responses": {
"201": {
"description": "Created",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/user_role.Response"
}
Expand All @@ -4508,11 +4499,9 @@ const docTemplate = `{
}
}
}
}
},
"/user/{cid}/role/": {
"get": {
"description": "Get roles for the user logged in",
},
"post": {
"description": "Create a new user role",
"consumes": [
"application/json"
],
Expand All @@ -4522,19 +4511,28 @@ const docTemplate = `{
"tags": [
"user-roles"
],
"summary": "Get your roles",
"summary": "Create a new user role",
"parameters": [
{
"type": "integer",
"description": "User CID",
"name": "cid",
"in": "path",
"required": true
},
{
"description": "User Role",
"name": "user_role",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user_role.Request"
}
}
],
"responses": {
"200": {
"description": "OK",
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/user_role.Response"
}
Expand All @@ -4554,7 +4552,7 @@ const docTemplate = `{
}
}
},
"/user/{cid}/role/{role_id}": {
"/user/{cid}/roles/{role_id}": {
"delete": {
"description": "Remove a user role",
"consumes": [
Expand Down Expand Up @@ -5159,6 +5157,10 @@ const docTemplate = `{
"type": "integer",
"example": 1293257
},
"assignee_name": {
"type": "string",
"example": "John Doe"
},
"created_at": {
"type": "string",
"example": "2021-01-01T00:00:00Z"
Expand Down Expand Up @@ -5187,6 +5189,10 @@ const docTemplate = `{
"type": "integer",
"example": 1293257
},
"secondary_assignee_name": {
"type": "string",
"example": "Jane Doe"
},
"shifts": {
"type": "boolean",
"example": true
Expand Down Expand Up @@ -5431,6 +5437,9 @@ const docTemplate = `{
"type": "integer",
"example": 1
},
"name": {
"type": "string"
},
"position_id": {
"type": "integer",
"example": 1
Expand Down Expand Up @@ -5944,6 +5953,9 @@ const docTemplate = `{
"type": "integer",
"example": 1
},
"name": {
"type": "string"
},
"position_id": {
"type": "integer",
"example": 1
Expand Down Expand Up @@ -6394,25 +6406,25 @@ const docTemplate = `{
"type": "string",
"example": "2021-01-01T00:00:00Z"
},
"first_name": {
"type": "string",
"example": "John"
},
"id": {
"type": "integer",
"example": 1
},
"last_name": {
"type": "string",
"example": "Doe"
},
"reason": {
"type": "string",
"example": "I want to transfer to ZDV"
},
"requestType": {
"request_type": {
"$ref": "#/definitions/types.RequestType"
},
"requested_facility": {
"allOf": [
{
"$ref": "#/definitions/constants.FacilityID"
}
],
"example": "ZDV"
},
"status": {
"$ref": "#/definitions/types.StatusType"
},
Expand Down
78 changes: 45 additions & 33 deletions external/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -4450,9 +4450,9 @@
}
}
},
"/user/{cid}/role": {
"post": {
"description": "Create a new user role",
"/user/{cid}/roles": {
"get": {
"description": "Get roles for the user logged in",
"consumes": [
"application/json"
],
Expand All @@ -4462,28 +4462,19 @@
"tags": [
"user-roles"
],
"summary": "Create a new user role",
"summary": "Get your roles",
"parameters": [
{
"type": "integer",
"description": "User CID",
"name": "cid",
"in": "path",
"required": true
},
{
"description": "User Role",
"name": "user_role",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user_role.Request"
}
}
],
"responses": {
"201": {
"description": "Created",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/user_role.Response"
}
Expand All @@ -4501,11 +4492,9 @@
}
}
}
}
},
"/user/{cid}/role/": {
"get": {
"description": "Get roles for the user logged in",
},
"post": {
"description": "Create a new user role",
"consumes": [
"application/json"
],
Expand All @@ -4515,19 +4504,28 @@
"tags": [
"user-roles"
],
"summary": "Get your roles",
"summary": "Create a new user role",
"parameters": [
{
"type": "integer",
"description": "User CID",
"name": "cid",
"in": "path",
"required": true
},
{
"description": "User Role",
"name": "user_role",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user_role.Request"
}
}
],
"responses": {
"200": {
"description": "OK",
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/user_role.Response"
}
Expand All @@ -4547,7 +4545,7 @@
}
}
},
"/user/{cid}/role/{role_id}": {
"/user/{cid}/roles/{role_id}": {
"delete": {
"description": "Remove a user role",
"consumes": [
Expand Down Expand Up @@ -5152,6 +5150,10 @@
"type": "integer",
"example": 1293257
},
"assignee_name": {
"type": "string",
"example": "John Doe"
},
"created_at": {
"type": "string",
"example": "2021-01-01T00:00:00Z"
Expand Down Expand Up @@ -5180,6 +5182,10 @@
"type": "integer",
"example": 1293257
},
"secondary_assignee_name": {
"type": "string",
"example": "Jane Doe"
},
"shifts": {
"type": "boolean",
"example": true
Expand Down Expand Up @@ -5424,6 +5430,9 @@
"type": "integer",
"example": 1
},
"name": {
"type": "string"
},
"position_id": {
"type": "integer",
"example": 1
Expand Down Expand Up @@ -5937,6 +5946,9 @@
"type": "integer",
"example": 1
},
"name": {
"type": "string"
},
"position_id": {
"type": "integer",
"example": 1
Expand Down Expand Up @@ -6387,25 +6399,25 @@
"type": "string",
"example": "2021-01-01T00:00:00Z"
},
"first_name": {
"type": "string",
"example": "John"
},
"id": {
"type": "integer",
"example": 1
},
"last_name": {
"type": "string",
"example": "Doe"
},
"reason": {
"type": "string",
"example": "I want to transfer to ZDV"
},
"requestType": {
"request_type": {
"$ref": "#/definitions/types.RequestType"
},
"requested_facility": {
"allOf": [
{
"$ref": "#/definitions/constants.FacilityID"
}
],
"example": "ZDV"
},
"status": {
"$ref": "#/definitions/types.StatusType"
},
Expand Down
Loading

0 comments on commit b211f8e

Please sign in to comment.