ほとんどのapiエンドポイントを認証ありにした2

This commit is contained in:
hijiki 2024-11-08 04:59:01 +09:00
parent e2689a1d8d
commit 2a561f16ef
3 changed files with 6 additions and 2 deletions

View File

@ -15,7 +15,7 @@ import { ApiError } from '../../error.js';
export const meta = {
tags: ['notes'],
requireCredential: false,
requireCredential: true,
res: {
type: 'array',

View File

@ -18,6 +18,8 @@ import { CacheService } from '@/core/CacheService.js';
export const meta = {
tags: ['notes'],
requireCredential: true,
res: {
type: 'array',
optional: false, nullable: false,
@ -98,7 +100,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
if (!ps.withBots) query.andWhere('user.isBot = FALSE');
if (ps.withRenotes === false) {
query.andWhere(new Brackets(qb => {
qb.where('note.renoteId IS NULL');

View File

@ -20,6 +20,8 @@ import { ApiError } from '../../error.js';
export const meta = {
tags: ['notes'],
requireCredential: true,
res: {
type: 'array',
optional: false, nullable: false,