Progress on #18
This commit is contained in:
parent
a9130c1af8
commit
6a2dc0d4d8
7 changed files with 167 additions and 109 deletions
pages/api
|
@ -1,6 +1,6 @@
|
|||
import fsPromises from 'fs/promises'
|
||||
import path from 'path'
|
||||
import { Service, ServiceStatus } from '../../interfaces/Services';
|
||||
import { Service, Status } from '../../interfaces/CardTypes';
|
||||
|
||||
export default async function ServicesAPI(req: any, res: any) {
|
||||
try {
|
||||
|
@ -8,7 +8,7 @@ export default async function ServicesAPI(req: any, res: any) {
|
|||
const data = await fsPromises.readFile(filePath)
|
||||
.then((file) => JSON.parse(file.toString()));
|
||||
data.services.forEach((service: Service) => {
|
||||
service.status = ServiceStatus.loading;
|
||||
service.status = Status.loading;
|
||||
});
|
||||
|
||||
res.status(200).json(data.services);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue