mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 15:57:06 +08:00
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")
|
@console_ns.route("/logout")
|
||||||
class LogoutApi(Resource):
|
class LogoutApi(Resource):
|
||||||
@setup_required
|
@setup_required
|
||||||
def get(self):
|
def post(self):
|
||||||
account = cast(Account, flask_login.current_user)
|
account = cast(Account, flask_login.current_user)
|
||||||
if isinstance(account, flask_login.AnonymousUserMixin):
|
if isinstance(account, flask_login.AnonymousUserMixin):
|
||||||
return {"result": "success"}
|
return {"result": "success"}
|
||||||
|
|||||||
@ -84,8 +84,8 @@ export const updateUserProfile: Fetcher<CommonResponse, { url: string; body: Rec
|
|||||||
return post<CommonResponse>(url, { body })
|
return post<CommonResponse>(url, { body })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const logout: Fetcher<CommonResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {
|
export const logout: Fetcher<CommonResponse, { url: string; body?: Record<string, any>; params?: Record<string, any> }> = ({ url, body }) => {
|
||||||
return get<CommonResponse>(url, params)
|
return post<CommonResponse>(url, { body: body ?? {} })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const fetchLangGeniusVersion: Fetcher<LangGeniusVersionResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {
|
export const fetchLangGeniusVersion: Fetcher<LangGeniusVersionResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user