Fix: Install page redirects to signin if Dify finished setup. (#762)

This commit is contained in:
Matri authored and GitHub committed 2023-08-07 13:19:47 +08:00
1 parent cc7b5d128b
commit 6242e91a6b
5 files changed
+139 -117

No files matched your search

+9 -8
View File
@@ -19,15 +19,16 @@ from .wraps import only_edition_self_hosted
class SetupApi(Resource):
@only_edition_self_hosted
def get(self):
setup_status = get_setup_status()
if setup_status:
return {
'step': 'finished',
'setup_at': setup_status.setup_at.isoformat()
}
return {'step': 'not_start'}
if current_app.config['EDITION'] == 'SELF_HOSTED':
setup_status = get_setup_status()
if setup_status:
return {
'step': 'finished',
'setup_at': setup_status.setup_at.isoformat()
}
return {'step': 'not_start'}
return {'step': 'finished'}
@only_edition_self_hosted
def post(self):