server v1.0.1

This commit is contained in:
2020-09-17 19:00:30 +02:00
parent 27552e5eb0
commit fa0b7e6503
3 changed files with 11 additions and 5 deletions

View File

@@ -53,7 +53,10 @@ export async function createRestaurant(request, oldRestaurant) {
name: sanitizer.sanitize.keepUnicode(request.name),
city: sanitizer.sanitize.keepUnicode(request.city),
adress: sanitizer.sanitize.keepUnicode(request.adress),
location: request.location,
location: {
type: "Point",
coordinates: request.coordinates,
},
imgUrl: img,
workingHours: request.workingHours,
description: sanitizer.sanitize.keepUnicode(request.description),
@@ -70,7 +73,10 @@ export async function createRestaurant(request, oldRestaurant) {
city: sanitizer.sanitize.keepUnicode(request.city),
dishes: oldRestaurant.dishes,
adress: sanitizer.sanitize.keepUnicode(request.adress),
location: request.location,
location: {
type: "Point",
coordinates: request.coordinates,
},
imgUrl: img,
workingHours: request.workingHours,
description: sanitizer.sanitize.keepUnicode(request.description),

View File

@@ -66,14 +66,14 @@ function generatePasswordResetToken(email) {
email: email,
},
jwtSecret,
{ expiresIn: "15m" }
{ expiresIn: "30m" }
);
return token;
}
export function generatePasswordResetLink(email) {
const token = generatePasswordResetToken(email);
const link = `https://www.menui.pl/forgot?token=${token}`;
const link = `localhost:3000/resetpassword?token=${token}`;
return link;
}