xv
This commit is contained in:
parent
71b05b7e47
commit
8ef929002d
13 changed files with 198 additions and 72 deletions
|
@ -5,7 +5,6 @@ from files.helpers.const import *
|
|||
from files.classes import *
|
||||
from flask import *
|
||||
from files.__main__ import app, limiter
|
||||
from sqlalchemy.orm import joinedload
|
||||
|
||||
@app.get("/authorize")
|
||||
@auth_required
|
||||
|
@ -190,13 +189,9 @@ def admin_app_id(v, aid):
|
|||
|
||||
aid=aid
|
||||
|
||||
oauth = g.db.query(OauthApp).options(
|
||||
joinedload(
|
||||
OauthApp.author)).filter_by(
|
||||
id=aid).one_or_none()
|
||||
oauth = g.db.query(OauthApp).filter_by(id=aid).one_or_none()
|
||||
|
||||
pids=oauth.idlist(page=int(request.values.get("page",1)),
|
||||
)
|
||||
pids=oauth.idlist(page=int(request.values.get("page",1)))
|
||||
|
||||
next_exists=len(pids)==101
|
||||
pids=pids[:100]
|
||||
|
@ -216,10 +211,7 @@ def admin_app_id_comments(v, aid):
|
|||
|
||||
aid=aid
|
||||
|
||||
oauth = g.db.query(OauthApp).options(
|
||||
joinedload(
|
||||
OauthApp.author)).filter_by(
|
||||
id=aid).one_or_none()
|
||||
oauth = g.db.query(OauthApp).filter_by(id=aid).one_or_none()
|
||||
|
||||
cids=oauth.comments_idlist(page=int(request.values.get("page",1)),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue