proper error

This commit is contained in:
ThatOneCalculator 2022-07-28 23:01:13 -07:00
parent 9d53e8322a
commit 291649b6e7

View File

@ -28,10 +28,10 @@ export const meta = {
}, },
errors: { errors: {
stlDisabled: { rtlDisabled: {
message: 'Hybrid timeline has been disabled.', message: 'Recommended timeline has been disabled.',
code: 'STL_DISABLED', code: 'RTL_DISABLED',
id: '620763f4-f621-4533-ab33-0577a1a3c342', id: '620763f4-f621-4533-ab33-0577a1a3c343',
}, },
}, },
} as const; } as const;
@ -60,7 +60,7 @@ export const paramDef = {
export default define(meta, paramDef, async (ps, user) => { export default define(meta, paramDef, async (ps, user) => {
const m = await fetchMeta(); const m = await fetchMeta();
if (m.disableLocalTimeline && (!user.isAdmin && !user.isModerator)) { if (m.disableLocalTimeline && (!user.isAdmin && !user.isModerator)) {
throw new ApiError(meta.errors.stlDisabled); throw new ApiError(meta.errors.rtlDisabled);
} }
//#region Construct query //#region Construct query