server v1.0.1
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user