hassio-nextcloud-backup/nextcloud_backup/backend/src/routes/homeAssistant.ts

19 lines
391 B
TypeScript
Raw Normal View History

2022-09-27 23:38:40 +02:00
import express from "express";
import * as haOsService from "../services/homeAssistantService.js"
const router = express.Router();
router.get("/backups/", (req, res, next) => {
haOsService.getBackups()
.then((value)=>{
res.json(value.body.data.backups);
}).catch((reason)=>{
res.status(500);
res.json(reason);
})
});
router.get("")
export default router;