set case to watch on auth

This commit is contained in:
2023-10-26 07:38:10 +01:00
parent f3da69dc75
commit 1807749bba
4 changed files with 77 additions and 39 deletions
@@ -37,6 +37,8 @@ export default async function ApiProxy(req, res) {
var data = JSON.stringify(req.body);
var queryUrl = "pinswg_watchlists";
console.log(data);
var config = {
method: "post",
url: WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
@@ -51,11 +53,16 @@ export default async function ApiProxy(req, res) {
data: data,
};
console.log(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl));
console.log(data);
return axios(config)
.then(({ data }) => {
res.status(200).json(data);
})
.catch((err) => {
console.log(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl));
console.log(data);
console.log(consoleLogger(err));
res.status(400).json(err);
});