Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/controllers/team.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,9 @@ export const deleteTeamAvatar = async (req, res, next) => {

/**
* @desc Delete team
* @route /api/organization/:organizationId/department/:departmentId/team/:teamId/
* @route /api/organization/:organizationId/department/:departmentId/team/:teamId
* @method DELETE
* @access private - admins or organization owners only
* @access private - admins, organization owners, department managers, or team creators
*/
export const deleteTeam = async (req, res, next) => {
try {
Expand Down Expand Up @@ -825,7 +825,7 @@ export const deleteTeam = async (req, res, next) => {
if (!team) {
return res.status(404).json({
success: false,
message: 'Team not found',
message: 'Team not found or already deleted',
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,7 @@
}
}
},
"/api/organization/{organizationId}/department/{departmentId}/team/{teamId}": {
"/api/organization/{organizationId}/department/{departmentId}/team/{teamId}/": {
"delete": {
"tags": ["Team"],
"summary": "Delete a team",
Expand Down
2 changes: 1 addition & 1 deletion src/routes/team.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ router.delete(
);

router.delete(
'/api/organization/:organizationId/department/:departmentId/team/:teamId/',
'/api/organization/:organizationId/department/:departmentId/team/:teamId',
verifyAccessToken,
deleteTeam,
);
Expand Down