istg
This commit is contained in:
parent
82813ffe7b
commit
5289de0cf0
1 changed files with 2 additions and 2 deletions
|
@ -59,14 +59,14 @@ export const paramDef = {
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, paramDef, async (ps, user) => {
|
export default define(meta, paramDef, async (ps, user) => {
|
||||||
const m = await fetchMeta();
|
const m = await fetchMeta();
|
||||||
const formattedInstances = `(${m.recommendedInstances.toString().split(',').map(v => JSON.stringify(`'${v.toString()}'`)).join(', ')})`;
|
// const formattedInstances = `(${m.recommendedInstances.toString().split(',').map(v => JSON.stringify(`'${v.toString()}'`)).join(', ')})`;
|
||||||
if (m.disableRecommendedTimeline) {
|
if (m.disableRecommendedTimeline) {
|
||||||
if (user == null || (!user.isAdmin && !user.isModerator)) {
|
if (user == null || (!user.isAdmin && !user.isModerator)) {
|
||||||
throw new ApiError(meta.errors.rtlDisabled);
|
throw new ApiError(meta.errors.rtlDisabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const cursed = `(note.userHost = ANY (ARRAY${m.recommendedInstances.toString().split(',')})`;
|
const cursed = `(note.userHost = ANY (ARRAY["${m.recommendedInstances.join('","')}"])`;
|
||||||
console.log(cursed);
|
console.log(cursed);
|
||||||
//#region Construct query
|
//#region Construct query
|
||||||
const query = makePaginationQuery(Notes.createQueryBuilder('note'),
|
const query = makePaginationQuery(Notes.createQueryBuilder('note'),
|
||||||
|
|
Loading…
Reference in a new issue