Merge branch 'frontend' into gruppDM
This commit is contained in:
commit
91671b2b63
2 changed files with 52 additions and 2 deletions
|
@ -108,6 +108,56 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/promote/{projectName}": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"description": "Promote a user to project manager",
|
||||
"consumes": [
|
||||
"text/plain"
|
||||
],
|
||||
"produces": [
|
||||
"text/plain"
|
||||
],
|
||||
"tags": [
|
||||
"Auth"
|
||||
],
|
||||
"summary": "Promote to project manager",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Project name",
|
||||
"name": "projectName",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "User name",
|
||||
"name": "userName",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/promoteToAdmin": {
|
||||
"post": {
|
||||
"security": [
|
||||
|
|
|
@ -538,7 +538,7 @@ export const api: API = {
|
|||
): Promise<APIResponse<WeeklyReport>> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`/api/getWeeklyReport?projectName=${projectName}&week=${week}&targetUser=${targetUser}`,
|
||||
`/api/getWeeklyReport?projectName=${projectName}&week=${week}&targetUser=${targetUser ?? ""}`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
@ -566,7 +566,7 @@ export const api: API = {
|
|||
): Promise<APIResponse<WeeklyReport[]>> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`/api/getAllWeeklyReports/${projectName}?targetUser=${targetUser}`,
|
||||
`/api/getAllWeeklyReports/${projectName}?targetUser=${targetUser ?? ""}`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
|
Loading…
Reference in a new issue