mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-09 23:59:01 +08:00
添加导出所有数据的API接口
This commit is contained in:
parent
317e3fc724
commit
4448fc74c3
@ -89,6 +89,9 @@ $app.route("/api/settings")
|
||||
// backup
|
||||
$app.get("/api/backup", gistBackup);
|
||||
|
||||
// data
|
||||
$app.get("/api/export", exportData);
|
||||
|
||||
$app.all("/", async (req, res) => {
|
||||
res.send("Hello from Sub-Store! Made with ❤️ by Peng-YM.");
|
||||
});
|
||||
@ -175,6 +178,11 @@ async function updateSettings(req, res) {
|
||||
});
|
||||
}
|
||||
|
||||
// export data
|
||||
async function exportData(req, res) {
|
||||
res.json($.read("#sub-store"));
|
||||
}
|
||||
|
||||
/**************************** API -- Subscriptions ***************************************/
|
||||
// refresh resource
|
||||
async function refreshResource(req, res) {
|
||||
|
2
backend/sub-store.min.js
vendored
2
backend/sub-store.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user