diff --git a/flake.lock b/flake.lock index 0ac0140..54bccca 100644 --- a/flake.lock +++ b/flake.lock @@ -20,22 +20,41 @@ }, "nixpkgs": { "locked": { - "lastModified": 1695806987, - "narHash": "sha256-fX5kGs66NZIxCMcpAGIpxuftajHL8Hil1vjHmjjl118=", + "lastModified": 1699099776, + "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f3dab3509afca932f3f4fd0908957709bb1c1f57", + "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1699169573, + "narHash": "sha256-cvUb1xZkvOp3W2SzylStrTirhVd9zCeo5utJl9nSIhw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "aeefe2054617cae501809b82b44a8e8f7be7cc4b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" } }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable" } }, "systems": { diff --git a/flake.nix b/flake.nix index cceb23d..8157c3e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,18 +1,21 @@ { description = "Automoderation web app"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05"; inputs.flake-utils.url = "github:numtide/flake-utils"; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, nixpkgs-stable }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; + pkgs-stable = nixpkgs-stable.legacyPackages.${system}; pname = "some-automoderation"; version = "0.0.1"; in { devShells.default = pkgs.mkShell { buildInputs = [ pkgs.go - pkgs.wgo + pkgs-stable.wgo pkgs.semgrep pkgs.gopls pkgs.nodePackages.tailwindcss diff --git a/routes/room_page.go b/routes/room_page.go index b5f3cb8..497bc1c 100644 --- a/routes/room_page.go +++ b/routes/room_page.go @@ -32,6 +32,8 @@ func registerPageRoutes( func streamingBsRoute() http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { + r.ParseForm() + queryParam := r.FormValue("mobile") w.Header().Set("Cache-Control", "no-cache") w.Header().Set("Connection", "keep-alive") w.Header().Set("Content-Type", "text/event-stream") @@ -43,10 +45,10 @@ func streamingBsRoute() http.HandlerFunc { return default: log.Printf("another step in streaming bs") - data := "data: