Skip to content

Commit

Permalink
Adiciona endpoint de admin
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldovictor committed Dec 5, 2023
1 parent 9d01dc3 commit 3ddd1af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Request } from "express";

const USER_API_URL = process.env.USER_API_URL || 'http://localhost:8001';
const VIDEO_API_URL = process.env.VIDEO_API_URL || 'http://localhost:8002';
const ADMIN_API_URL = process.env.ADMIN_API_URL || 'http://localhost:8003';


const getUrl = (req: Request) => {
Expand All @@ -19,7 +20,9 @@ const getHost = (req: Request) => {
return VIDEO_API_URL;
} else if (req.baseUrl.match('/userservice')) {
return USER_API_URL;
}
} else if (req.baseUrl.match('/adminservice')) {
return ADMIN_API_URL;
}
else {
return ''
}
Expand Down

0 comments on commit 3ddd1af

Please sign in to comment.