fix(config): add env for UPLOADER_DATE_FORMAT

This commit is contained in:
diced 2022-10-01 13:34:41 -07:00
parent d4369d2503
commit feb75a8a42
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1
3 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,6 @@ export interface ConfigUploader {
admin_limit: number;
user_limit: number;
disabled_extensions: string[];
format_date: string;
}

View file

@ -75,6 +75,7 @@ export default function readConfig() {
map('UPLOADER_ADMIN_LIMIT', 'number', 'uploader.admin_limit'),
map('UPLOADER_USER_LIMIT', 'number', 'uploader.user_limit'),
map('UPLOADER_DISABLED_EXTENSIONS', 'array', 'uploader.disabled_extensions'),
map('UPLOADER_FORMAT_DATE', 'string', 'uploader.format_date'),
map('URLS_ROUTE', 'string', 'urls.route'),
map('URLS_LENGTH', 'number', 'urls.length'),

View file

@ -1,12 +1,12 @@
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { User, userState } from 'lib/recoil/user';
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
import { userSelector } from 'lib/recoil/user';
import { useRecoilState } from 'recoil';
import useFetch from './useFetch';
export default function login() {
const router = useRouter();
const [user, setUser] = useRecoilState(userState);
const [user, setUser] = useRecoilState(userSelector);
const [loading, setLoading] = useState(!user);
async function load() {