add edit & delete button to tender & update contacts dashbaord
This commit is contained in:
@@ -27,6 +27,20 @@ export class TendersController {
|
||||
}
|
||||
}
|
||||
|
||||
async delete(req: AuthRequest, res: Response, next: NextFunction) {
|
||||
try {
|
||||
await tendersService.delete(req.params.id, req.user!.id)
|
||||
res.json(
|
||||
ResponseFormatter.success(
|
||||
true,
|
||||
'تم حذف المناقصة بنجاح - Tender deleted successfully'
|
||||
)
|
||||
)
|
||||
} catch (error) {
|
||||
next(error)
|
||||
}
|
||||
}
|
||||
|
||||
async findAll(req: AuthRequest, res: Response, next: NextFunction) {
|
||||
try {
|
||||
const page = parseInt(req.query.page as string) || 1;
|
||||
|
||||
Reference in New Issue
Block a user