mirror of
https://github.com/qwertyforce/scenery.git
synced 2025-05-01 13:10:14 +00:00
increase import timeout
This commit is contained in:
parent
b4246fdf22
commit
782e1f4d9e
@ -34,7 +34,8 @@ export default function Import_from_derpi(props: any) {
|
||||
axios(`/import_from_derpi`, {
|
||||
method: "post",
|
||||
data: { id: ImageID },
|
||||
withCredentials: true
|
||||
withCredentials: true,
|
||||
timeout:5*60*1000
|
||||
}).then((resp) => {
|
||||
setOpen(false)
|
||||
alert(JSON.stringify(resp.data))
|
||||
|
@ -25,6 +25,7 @@ async function import_from_derpi(req: Request, res: Response) {
|
||||
if (req.session?.user_id) {
|
||||
const user = await db_ops.activated_user.find_user_by_id(req.session?.user_id)
|
||||
if (user[0].isAdmin) {
|
||||
req.setTimeout(5*60*1000)
|
||||
try {
|
||||
const imgs = await db_ops.image_ops.find_image_by_derpi_id(derpy_import_id)
|
||||
if (imgs.length !== 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user