mirror of https://github.com/langgenius/dify.git
Fix logout flow to use POST
This commit is contained in:
parent
c20e0ad90d
commit
be13f79696
|
|
@ -95,7 +95,7 @@ class LoginApi(Resource):
|
|||
@console_ns.route("/logout")
|
||||
class LogoutApi(Resource):
|
||||
@setup_required
|
||||
def get(self):
|
||||
def post(self):
|
||||
account = cast(Account, flask_login.current_user)
|
||||
if isinstance(account, flask_login.AnonymousUserMixin):
|
||||
return {"result": "success"}
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ export const updateUserProfile: Fetcher<CommonResponse, { url: string; body: Rec
|
|||
return post<CommonResponse>(url, { body })
|
||||
}
|
||||
|
||||
export const logout: Fetcher<CommonResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {
|
||||
return get<CommonResponse>(url, params)
|
||||
export const logout: Fetcher<CommonResponse, { url: string; body?: Record<string, any>; params?: Record<string, any> }> = ({ url, body }) => {
|
||||
return post<CommonResponse>(url, { body: body ?? {} })
|
||||
}
|
||||
|
||||
export const fetchLangGeniusVersion: Fetcher<LangGeniusVersionResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue