Updated date range handling. Fixed share page.
This commit is contained in:
@@ -37,7 +37,7 @@ export function getLocalTime(t) {
|
||||
return addMinutes(new Date(t), new Date().getTimezoneOffset());
|
||||
}
|
||||
|
||||
export function getDateRange(value, locale = 'en-US') {
|
||||
export function parseDateRange(value, locale = 'en-US') {
|
||||
const now = new Date();
|
||||
const dateLocale = getDateLocale(locale);
|
||||
|
||||
|
||||
@@ -44,7 +44,9 @@ export const useAuth = createMiddleware(async (req, res, next) => {
|
||||
user = await redis.get(authKey);
|
||||
}
|
||||
|
||||
log({ token, payload, user, shareToken });
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
log({ token, shareToken, payload, user });
|
||||
}
|
||||
|
||||
if (!user?.id && !shareToken) {
|
||||
log('useAuth: User not authorized');
|
||||
|
||||
Reference in New Issue
Block a user