internal changes only
- remade config module - renamed loc to i18n because that's what all developers do - moved code to src to make repo look cleaner - fixed some i18n strings
This commit is contained in:
11
src/modules/sub/errors.js
Normal file
11
src/modules/sub/errors.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import loc from "./i18n.js";
|
||||
|
||||
export function internalError(res) {
|
||||
res.status(501).json({ status: "error", text: "Internal Server Error" });
|
||||
}
|
||||
export function errorUnsupported(lang) {
|
||||
return loc(lang, 'apiError', 'notSupported') + loc(lang, 'apiError', 'letMeKnow');
|
||||
}
|
||||
export function genericError(lang, host) {
|
||||
return loc(lang, 'apiError', 'brokenLink', host) + loc(lang, 'apiError', 'letMeKnow');
|
||||
}
|
||||
Reference in New Issue
Block a user