mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-12-23 20:15:13 +00:00
Compare commits
No commits in common. "5a4ea9a134b5039f55cd51185df4dc4073b63c81" and "25b6b43e9fa199248ce1a7652ca785f6a8f7560b" have entirely different histories.
5a4ea9a134
...
25b6b43e9f
|
@ -89,7 +89,7 @@ contactpersonsRouter.post('/', async (req: Request, res: Response) => {
|
||||||
const success = await ContactPersonService.createContactEntry(user.user_id, vendor_id, first_name, last_name, gender, email, phone);
|
const success = await ContactPersonService.createContactEntry(user.user_id, vendor_id, first_name, last_name, gender, email, phone);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
res.sendStatus(201);
|
res.sendStatus(200);
|
||||||
} else {
|
} else {
|
||||||
res.sendStatus(500);
|
res.sendStatus(500);
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,11 +85,11 @@ pricealarmsRouter.put('/', async (req: Request, res: Response) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update price alarm
|
// Create price alarm
|
||||||
const success = await PriceAlarmsService.updatePriceAlarm(alarm_id, user.user_id, defined_price);
|
const success = await PriceAlarmsService.updatePriceAlarm(alarm_id, user.user_id, defined_price);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
res.status(200).send(JSON.stringify({success: true}));
|
res.status(201).send(JSON.stringify({success: true}));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
res.status(500).send(JSON.stringify({success: false}));
|
res.status(500).send(JSON.stringify({success: false}));
|
||||||
|
|
|
@ -117,7 +117,7 @@ pricesRouter.post('/', async (req: Request, res: Response) => {
|
||||||
const success = await PriceService.createPriceEntry(user.user_id, vendor_id, product_id, price_in_cents);
|
const success = await PriceService.createPriceEntry(user.user_id, vendor_id, product_id, price_in_cents);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
res.sendStatus(201);
|
res.sendStatus(200);
|
||||||
} else {
|
} else {
|
||||||
res.sendStatus(500);
|
res.sendStatus(500);
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ usersRouter.post('/checkSessionValid', async (req: Request, res: Response) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the session details back to the user
|
// Send the session details back to the user
|
||||||
res.status(200).send(user);
|
res.status(201).send(user);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('Error handling a request: ' + e.message);
|
console.log('Error handling a request: ' + e.message);
|
||||||
res.status(500).send(JSON.stringify({'message': 'Internal Server Error. Try again later.'}));
|
res.status(500).send(JSON.stringify({'message': 'Internal Server Error. Try again later.'}));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user