hospital information done
This commit is contained in:
@ -27,6 +27,7 @@ import { ExaminationDetailController } from '../controllers/examination_detail';
|
||||
import { ExaminationTypeController } from '../controllers/examination_type';
|
||||
import { ServiceExaminationController } from '../controllers/service_examination';
|
||||
import { LaboratoryController } from '../controllers/laboratory';
|
||||
import { HospitalInformationController } from '../controllers/hospital_information';
|
||||
|
||||
export class RoutePrivate {
|
||||
static setup(app: express.Application) {
|
||||
@ -111,7 +112,7 @@ export class RoutePrivate {
|
||||
app.put('/api/room/update/:id', RoomController.update)
|
||||
app.delete('/api/room/delete/:id/:hard', RoomController.delete)
|
||||
app.put('/api/room/restore/:id', RoomController.restore)
|
||||
|
||||
|
||||
app.get('/api/laboratory/list', LaboratoryController.list)
|
||||
|
||||
app.get('/api/room-services/list', RoomServicesController.list)
|
||||
@ -167,7 +168,7 @@ export class RoutePrivate {
|
||||
app.put('/api/doctor-schedule/update/:id', DoctorScheduleController.update)
|
||||
app.delete('/api/doctor-schedule/delete/:id/:hard', DoctorScheduleController.delete)
|
||||
app.put('/api/doctor-schedule/restore/:id', DoctorScheduleController.restore)
|
||||
|
||||
|
||||
app.get('/api/measurement-unit/list', MeasurementUnitController.list)
|
||||
app.post('/api/measurement-unit/create', MeasurementUnitController.create)
|
||||
app.get('/api/measurement-unit/detail/:id', MeasurementUnitController.detail)
|
||||
@ -207,5 +208,11 @@ export class RoutePrivate {
|
||||
app.get('/api/service-examination/list', ServiceExaminationController.list)
|
||||
app.put('/api/service-examination/:id', ServiceExaminationController.update)
|
||||
|
||||
app.get('/api/hospital-information/view', HospitalInformationController.view)
|
||||
app.post('/api/hospital-information/create', HospitalInformationController.create)
|
||||
app.put('/api/hospital-information/update/:id', HospitalInformationController.update)
|
||||
app.post('/api/hospital-information/upload-logo', HospitalInformationController.uploadlogo)
|
||||
app.delete('/api/hospital-information/delete-logo', HospitalInformationController.deletelogo)
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,53 @@
|
||||
// import express from 'express';
|
||||
// import { Language } from '../langs/lang';
|
||||
|
||||
// export class RoutePublic {
|
||||
// static setup(app: express.Application) {
|
||||
|
||||
// app.use(Language.apply)
|
||||
// }
|
||||
// }
|
||||
|
||||
// import express from 'express';
|
||||
// import { Language } from '../langs/lang';
|
||||
|
||||
// export class RoutePublic {
|
||||
// static setup(app: express.Application) {
|
||||
|
||||
// app.use(Language.apply)
|
||||
// }
|
||||
// }
|
||||
|
||||
import express from 'express';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { Language } from '../langs/lang';
|
||||
|
||||
export class RoutePublic {
|
||||
static setup(app: express.Application) {
|
||||
app.use(Language.apply);
|
||||
|
||||
app.use(Language.apply)
|
||||
// ⚠️ TAMBAHKAN INI - Serve static files untuk uploads
|
||||
app.use('/uploads', express.static(path.join(__dirname, '../../uploads')));
|
||||
|
||||
// Atau dengan custom error handling (pilih salah satu):
|
||||
/*
|
||||
app.get('/uploads/*', (req, res) => {
|
||||
const filePath = path.join(__dirname, '../../', req.path);
|
||||
|
||||
if (fs.existsSync(filePath)) {
|
||||
res.set({
|
||||
'Cache-Control': 'public, max-age=86400',
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
});
|
||||
res.sendFile(filePath);
|
||||
} else {
|
||||
res.status(404).json({
|
||||
success: false,
|
||||
message: 'File not found'
|
||||
});
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user