Update nixos version and change 301 to 302

deployment
Inex Code 2023-03-20 17:57:02 +02:00
parent 096cb76103
commit 22ae16b8fd
1 changed files with 3 additions and 3 deletions

6
app.py
View File

@ -11,10 +11,10 @@ current_channel = open("/var/channel_url.txt", "r").read().strip()
class Channel(Resource):
def get(self):
"""GET request returns the 301 redirect to the
"""GET request returns the 302 redirect to the
current validated NixOS channel
"""
return redirect(current_channel, code=301)
return redirect(current_channel, code=302)
def post(self):
"""POST a new channel, save it to file and update
@ -34,7 +34,7 @@ class Channel(Resource):
class GetNewChannel(Resource):
def post(self):
r = requests.get("https://nixos.org/channels/nixos-22.05")
r = requests.get("https://nixos.org/channels/nixos-22.11")
channel = r.url
# Save the new channel to file
with open("/var/channel_url.txt", "w") as f: