uodate
This commit is contained in:
@ -205,9 +205,15 @@ export class HospitalInformationController {
|
||||
const file = req.files.file as fileUpload.UploadedFile;
|
||||
|
||||
// Validate file size (max 1MB)
|
||||
const maxSize = 1024 * 1024; // 1MB
|
||||
const maxSize = 10 * 1024 * 1024; // 10MB
|
||||
if (file.size > maxSize) {
|
||||
return ReturnHelper.errorResponse(res, 400, 400, Language.lang.failed_insert, "File size exceeds 1MB limit");
|
||||
return ReturnHelper.errorResponse(
|
||||
res,
|
||||
400,
|
||||
400,
|
||||
Language.lang.failed_insert,
|
||||
"File size exceeds 10MB limit"
|
||||
);
|
||||
}
|
||||
|
||||
// Validate file type
|
||||
|
||||
@ -84,7 +84,7 @@ export class RegistrationFeeController {
|
||||
const data = new RegistrationFee();
|
||||
data.type = param.type;
|
||||
data.service = Array.isArray(param.service) ? param.service : [];
|
||||
data.created_by = req.auth.data.name;
|
||||
data.created_by = req.auth?.data.name;
|
||||
|
||||
await OrmHelper.DB.getRepository(RegistrationFee).save(data);
|
||||
|
||||
@ -132,7 +132,7 @@ export class RegistrationFeeController {
|
||||
|
||||
registrationfee.type = param.type;
|
||||
registrationfee.service = Array.isArray(param.service) ? param.service : [];
|
||||
registrationfee.updated_by = req.auth.data.name;
|
||||
registrationfee.updated_by = req.auth?.data.name;
|
||||
|
||||
await OrmHelper.DB.manager.save(registrationfee);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user