From 4b7469355d5154bebf8022d5d2e853f4609eaa15 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 28 Apr 2022 13:54:48 +0300 Subject: [PATCH] Fix uris --- app.py | 6 ++++-- channel_url.txt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 00b5fab..a44a0e1 100644 --- a/app.py +++ b/app.py @@ -25,9 +25,10 @@ class Channel(Resource): args = parser.parse_args() channel = args['channel'] # Save the new channel to file - with open("channel_url.txt", "w") as f: + with open("/var/channel_url.txt", "w") as f: f.write(channel) # Update the current channel + global current_channel current_channel = channel return jsonify({"message": "Channel updated"}) @@ -36,9 +37,10 @@ class GetNewChannel(Resource): r = requests.get("https://nixos.org/channels/nixos-21.11") channel = r.url # Save the new channel to file - with open("channel_url.txt", "w") as f: + with open("/var/channel_url.txt", "w") as f: f.write(channel) # Update the current channel + global current_channel current_channel = channel return jsonify({"message": "Channel updated", "channel": channel}) diff --git a/channel_url.txt b/channel_url.txt index 58dc96c..06d62e0 100644 --- a/channel_url.txt +++ b/channel_url.txt @@ -1 +1 @@ -https://nixos.org/channels/nixos-21.05 \ No newline at end of file +https://nixos.org/channels/nixos-21.11 \ No newline at end of file