zen: fix rate limit
This commit is contained in:
parent
32e0b612d9
commit
dc62f9393a
6 changed files with 1206 additions and 16 deletions
|
|
@ -10,3 +10,13 @@ export const IpTable = mysqlTable(
|
|||
},
|
||||
(table) => [primaryKey({ columns: [table.ip] })],
|
||||
)
|
||||
|
||||
export const IpRateLimitTable = mysqlTable(
|
||||
"ip_rate_limit",
|
||||
{
|
||||
ip: varchar("ip", { length: 45 }).notNull(),
|
||||
interval: varchar("interval", { length: 10 }).notNull(),
|
||||
count: int("count").notNull(),
|
||||
},
|
||||
(table) => [primaryKey({ columns: [table.ip, table.interval] })],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue