You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/OpenAPI.json
+27-12Lines changed: 27 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1617,42 +1617,57 @@
1617
1617
]
1618
1618
}
1619
1619
},
1620
-
"/supervision-requests/pending-count/{userId}": {
1620
+
"/supervision-requests/count/{userId}": {
1621
1621
"get": {
1622
-
"description": "Returns the count of pending supervision requests for a specific user. Requesting a student gets their outgoing requests, requesting a supervisor gets their incoming requests.",
"description": "Returns the count of supervision requests for a specific user filtered by state. Requesting a student gets their outgoing requests, requesting a supervisor gets their incoming requests.",
@@ -137,35 +138,42 @@ export class SupervisionRequestsController {
137
138
);
138
139
}
139
140
140
-
@Get('pending-count/:userId')
141
+
@Get('count/:userId')
141
142
@ApiOperation({
142
-
summary: 'Get pending supervision request count for a user',
143
+
summary: 'Get supervision request count for a user by state',
143
144
description:
144
-
'Returns the count of pending supervision requests for a specific user. Requesting a student gets their outgoing requests, requesting a supervisor gets their incoming requests.',
145
+
'Returns the count of supervision requests for a specific user filtered by state. Requesting a student gets their outgoing requests, requesting a supervisor gets their incoming requests.',
145
146
})
146
147
@ApiParam({
147
148
name: 'userId',
148
-
description: 'ID of the user to get pending request count for',
149
+
description: 'ID of the user to get request count for',
149
150
type: String,
150
151
format: 'uuid',
151
152
example: '123e4567-e89b-12d3-a456-426614174000',
152
153
})
154
+
@ApiQuery({
155
+
name: 'request_state',
156
+
required: true,
157
+
enum: RequestState,
158
+
description: 'The request state to count',
159
+
})
153
160
@ApiResponse({
154
161
status: 200,
155
-
description: 'Returns the count of pending supervision requests',
156
-
type: PendingRequestCountEntity,
162
+
description: 'Returns the count of supervision requests',
163
+
type: SupervisionRequestCountEntity,
157
164
})
158
165
@ApiResponse({
159
166
status: 400,
160
-
description: 'Bad request - Invalid UUID or admin user requested',
167
+
description: 'Bad request - Invalid UUID, admin user requested, or missing request state',
0 commit comments