add rate limit

This commit is contained in:
mia 2024-02-03 19:41:38 -08:00
parent 480ba164f8
commit eb1de15fe0

View file

@ -1,12 +1,18 @@
import { Bites } from "@/models/index.js"; import { Bites } from "@/models/index.js";
import define from "../../define.js"; import define from "../../define.js";
import { createBite } from "@/services/create-bite.js"; import { createBite } from "@/services/create-bite.js";
import { MINUTE } from "@/const.js";
export const meta = { export const meta = {
tags: ["bites"], tags: ["bites"],
requireCredential: true, requireCredential: true,
limit: {
duration: MINUTE,
max: 30,
},
res: { res: {
type: "object", type: "object",
optional: false, optional: false,