This commit is contained in:
newtbot
2024-01-24 14:21:13 +08:00
parent 4aea6a8e4c
commit e710fa15a1
45 changed files with 463 additions and 828 deletions

View File

@@ -1,19 +1,9 @@
const { getAPIKey , addAPIKey } = require("../functions/apiDatabase.js");
const { addAPIKey } = require("../functions/api");
const express = require("express");
const router = express.Router();
router.get("/", async (req, res, next) => {
try {
const location = await getAPIKey();
res.status(200).json(location);
} catch (error) {
console.error(error);
next(error);
}
});
/*
1) ensure user is logged in (frontend session validation blah or wtv)
2) when user click on generate api key button, it will generate a random api key. how to get userid can be done by session or wtv
@@ -34,9 +24,6 @@ router.post("/new", async (req, res, next) => {
}
});
//update
//delete
//getbyid
module.exports = router;