mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-23 09:42:59 +01:00
19 lines
391 B
TypeScript
19 lines
391 B
TypeScript
|
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;
|