mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
proper error
This commit is contained in:
parent
9aeffce5df
commit
59c2927650
@ -28,10 +28,10 @@ export const meta = {
|
||||
},
|
||||
|
||||
errors: {
|
||||
stlDisabled: {
|
||||
message: 'Hybrid timeline has been disabled.',
|
||||
code: 'STL_DISABLED',
|
||||
id: '620763f4-f621-4533-ab33-0577a1a3c342',
|
||||
rtlDisabled: {
|
||||
message: 'Recommended timeline has been disabled.',
|
||||
code: 'RTL_DISABLED',
|
||||
id: '620763f4-f621-4533-ab33-0577a1a3c343',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
@ -60,7 +60,7 @@ export const paramDef = {
|
||||
export default define(meta, paramDef, async (ps, user) => {
|
||||
const m = await fetchMeta();
|
||||
if (m.disableLocalTimeline && (!user.isAdmin && !user.isModerator)) {
|
||||
throw new ApiError(meta.errors.stlDisabled);
|
||||
throw new ApiError(meta.errors.rtlDisabled);
|
||||
}
|
||||
|
||||
//#region Construct query
|
||||
|
Loading…
Reference in New Issue
Block a user