feat: Add monitor grouping functionality to backend
- Add optional 'group' field to Monitor schema with trimming and validation - Add group validation to Joi schemas for create and edit monitor endpoints - Add GET /api/v1/monitors/team/groups endpoint to fetch unique groups - Implement case-insensitive group filtering in database layer - Support for organizing monitors into collapsible groups 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
97a14ed926
commit
27d37ece7d
6 files changed
+50
No files matched your search
@@ -452,6 +452,24 @@ class MonitorController extends BaseController {
|
||||
SERVICE_NAME,
|
||||
"getAllGames"
|
||||
);
|
||||
|
||||
getGroupsByTeamId = this.asyncHandler(
|
||||
async (req, res) => {
|
||||
const teamId = req?.user?.teamId;
|
||||
if (!teamId) {
|
||||
throw this.errorService.createBadRequestError("Team ID is required");
|
||||
}
|
||||
|
||||
const groups = await this.monitorService.getGroupsByTeamId({ teamId });
|
||||
|
||||
return res.success({
|
||||
msg: "OK",
|
||||
data: groups,
|
||||
});
|
||||
},
|
||||
SERVICE_NAME,
|
||||
"getGroupsByTeamId"
|
||||
);
|
||||
}
|
||||
|
||||
export default MonitorController;
|
||||
Reference in new issue
Block a user