tighten date typing
This commit is contained in:
1 parent
e887c2308a
commit
456237ba4e
3 files changed
+10
-10
No files matched your search
@@ -19,9 +19,9 @@ class MaintenanceWindowController {
|
||||
|
||||
createMaintenanceWindows = async (req: Request, res: Response, next: NextFunction) => {
|
||||
try {
|
||||
createMaintenanceWindowBodyValidation.parse(req.body);
|
||||
const validatedBody = createMaintenanceWindowBodyValidation.parse(req.body);
|
||||
const teamId = requireTeamId(req?.user?.teamId);
|
||||
await this.maintenanceWindowService.createMaintenanceWindow({ teamId, body: req.body });
|
||||
await this.maintenanceWindowService.createMaintenanceWindow({ teamId, body: validatedBody });
|
||||
|
||||
return res.status(200).json({
|
||||
success: true,
|
||||
|
||||
Reference in new issue
Block a user