diff --git a/src/controllers/admin/auth/index.ts b/src/controllers/admin/auth/index.ts index 76596eb2..0c50960b 100644 --- a/src/controllers/admin/auth/index.ts +++ b/src/controllers/admin/auth/index.ts @@ -1,8 +1,8 @@ import { Router } from 'express'; -import login from './login'; +import loginAs from './loginAs'; const router = Router(); -router.post('/login/:userId', login); +router.post('/login/:userId', loginAs); export default router; diff --git a/src/controllers/admin/auth/login.ts b/src/controllers/admin/auth/loginAs.ts similarity index 100% rename from src/controllers/admin/auth/login.ts rename to src/controllers/admin/auth/loginAs.ts diff --git a/src/operations/upload.ts b/src/operations/upload.ts index 309a5a32..c2e69246 100644 --- a/src/operations/upload.ts +++ b/src/operations/upload.ts @@ -11,7 +11,7 @@ export const uploadFile = async (file: any, path: string, name: string) => { formData.append('path', path); formData.append('name', name); - const result = await axios.post(`http://localhost:4444/test/api`, formData, { + const result = await axios.post(`${env.front.website}/uploads/files/api`, formData, { headers: { 'Content-Type': 'multipart/form-data', 'Accept': 'application/json',