Colab Cookie Saving Correction

This commit is contained in:
ebolam
2022-09-08 19:33:29 -04:00
parent eb0f59bdfb
commit b182d8dfec
2 changed files with 12 additions and 7 deletions

View File

@@ -7694,12 +7694,9 @@ def UI_2_theme_list_refresh(data):
#==================================================================#
@socketio.on('save_cookies')
def UI_2_save_cookies(data):
print("Adding: {}".format(data))
print("to: {}".format(koboldai_vars.cookies))
for key in data:
#Note this won't sync to the client automatically as we're modifying a variable rather than setting it
koboldai_vars.cookies[key] = data[key]
print("Updated: {}".format(koboldai_vars.cookies))
with open("./settings/cookies.settings", "w") as f:
f.write(json.dumps(koboldai_vars.cookies))