Update nixos version and change 301 to 302
parent
096cb76103
commit
22ae16b8fd
6
app.py
6
app.py
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue