/api/backupProduct

This commit is contained in:
joseph le 2023-09-28 15:52:33 +07:00
parent d3aeb5477a
commit 9d8ca65341
1 changed files with 4 additions and 4 deletions

View File

@ -373,7 +373,7 @@ Route.post("/api/gitea-webhook", ({ request, response }) => {
});
Route.post("/api/backupProduct", async ({ request, response }) => {
try {
// try {
const date = moment(Date.now()).format("YYYYMMDD");
const token =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZF91c2VyIjoxLCJ1c2VybmFtZSI6ImVycHVzZXIiLCJjcmVhdGVkQXQiOiIyMDIzLTA4LTIzVDE1OjI4OjAxLjAwMCsxMDowMCIsInVwZGF0ZWRBdCI6IjIwMjMtMDgtMjNUMTU6Mjg6MDEuMDAwKzEwOjAwIiwiaWF0IjoxNjk1MjY0NTQwLCJleHAiOjE3MjY4MDA1NDB9.vBlZAc7TGKbOrsP7UjQzVY2hIoJCGXQDe3KUxYyv294";
@ -389,7 +389,7 @@ Route.post("/api/backupProduct", async ({ request, response }) => {
const addProduct = await Product.createMany(res.data)
console.log(addProduct)
} catch (error) {
response.status(500).send(error);
}
// } catch (error) {
// response.status(500).send(error);
// }
});