Fix uris
parent
280b468025
commit
4b7469355d
6
app.py
6
app.py
|
@ -25,9 +25,10 @@ class Channel(Resource):
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
channel = args['channel']
|
channel = args['channel']
|
||||||
# Save the new channel to file
|
# 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)
|
f.write(channel)
|
||||||
# Update the current channel
|
# Update the current channel
|
||||||
|
global current_channel
|
||||||
current_channel = channel
|
current_channel = channel
|
||||||
return jsonify({"message": "Channel updated"})
|
return jsonify({"message": "Channel updated"})
|
||||||
|
|
||||||
|
@ -36,9 +37,10 @@ class GetNewChannel(Resource):
|
||||||
r = requests.get("https://nixos.org/channels/nixos-21.11")
|
r = requests.get("https://nixos.org/channels/nixos-21.11")
|
||||||
channel = r.url
|
channel = r.url
|
||||||
# Save the new channel to file
|
# 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)
|
f.write(channel)
|
||||||
# Update the current channel
|
# Update the current channel
|
||||||
|
global current_channel
|
||||||
current_channel = channel
|
current_channel = channel
|
||||||
return jsonify({"message": "Channel updated", "channel": channel})
|
return jsonify({"message": "Channel updated", "channel": channel})
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
https://nixos.org/channels/nixos-21.05
|
https://nixos.org/channels/nixos-21.11
|
Loading…
Reference in New Issue