Skip to content

Commit

Permalink
fix(contents): disable contents and API (temporary)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipedeschamps committed Nov 21, 2022
1 parent 4e2eda5 commit 07a258d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions middleware.public.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const config = {

export async function middleware(request) {
const url = request.nextUrl;
url.pathname = '/api/v1/_responses/rate-limit-reached';
return NextResponse.rewrite(url);

try {
const rateLimitResult = await rateLimit.check(request);
Expand Down
2 changes: 2 additions & 0 deletions models/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { ValidationError } from 'errors/index.js';
import queries from 'models/queries';

async function findAll(values = {}, options = {}) {
return [];

values = validateValues(values);
await replaceOwnerUsernameWithOwnerId(values);
const offset = (values.page - 1) * values.per_page;
Expand Down

0 comments on commit 07a258d

Please sign in to comment.