投稿制限を解除
This commit is contained in:
parent
625992742b
commit
c7d1373020
1 changed files with 2 additions and 2 deletions
4
app.py
4
app.py
|
@ -170,7 +170,7 @@ async def api_get(id: str = None):
|
||||||
res.headers["CDN-Cache-Control"] = f"max-age=60"
|
res.headers["CDN-Cache-Control"] = f"max-age=60"
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@app.post("/api/litey/post", dependencies=[Depends(RateLimiter(times=4, seconds=3600))])
|
@app.post("/api/litey/post")
|
||||||
async def api_post(item: LiteYItem, req: Request):
|
async def api_post(item: LiteYItem, req: Request):
|
||||||
ctx["mongo_client"].litey.notes.insert_one({
|
ctx["mongo_client"].litey.notes.insert_one({
|
||||||
"id": str(uuid4()),
|
"id": str(uuid4()),
|
||||||
|
@ -210,7 +210,7 @@ async def api_ng_get():
|
||||||
res.headers["CDN-Cache-Control"] = f"max-age=60"
|
res.headers["CDN-Cache-Control"] = f"max-age=60"
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@app.post("/api/ng/post", dependencies=[Depends(RateLimiter(times=4, seconds=3600))])
|
@app.post("/api/ng/post")
|
||||||
async def api_ng_post(item: NGItem):
|
async def api_ng_post(item: NGItem):
|
||||||
ctx["mongo_client"].litey.ngs.insert_one({
|
ctx["mongo_client"].litey.ngs.insert_one({
|
||||||
"word": item.word
|
"word": item.word
|
||||||
|
|
Loading…
Add table
Reference in a new issue