Feat/token support (#909)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
parent
4c49ecedb5
commit
4b53bb1a32
32 changed files with 221 additions and 40 deletions
|
|
@ -3,7 +3,9 @@ import json
|
|||
import logging
|
||||
from datetime import datetime
|
||||
|
||||
from flask_login import login_required, current_user
|
||||
import flask
|
||||
from flask_login import current_user
|
||||
from core.login.login import login_required
|
||||
from flask_restful import Resource, reqparse, fields, marshal_with, abort, inputs
|
||||
from werkzeug.exceptions import Forbidden
|
||||
|
||||
|
|
@ -316,7 +318,7 @@ class AppApi(Resource):
|
|||
|
||||
if current_user.current_tenant.current_role not in ['admin', 'owner']:
|
||||
raise Forbidden()
|
||||
|
||||
|
||||
app = _get_app(app_id, current_user.current_tenant_id)
|
||||
|
||||
db.session.delete(app)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue