forked from Yara724/api
Initial commit after migration to gitea
This commit is contained in:
9
src/helpers/urlCreator.ts
Normal file
9
src/helpers/urlCreator.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export function buildFileLink(path: string): string {
|
||||
const baseUrl = process.env.URL;
|
||||
if(process.env.NODE_ENV === 'local'){
|
||||
return baseUrl + "/" + path;
|
||||
}else{
|
||||
return baseUrl + "/api/" + path;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user