Compare commits

..

No commits in common. "17ec2185d07e717d16ac63d79d1e0715621e371f" and "06ed48f4cfa5f6154dabe0b0a06f6f6b4a91a1e5" have entirely different histories.

3 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
tag = "super_test"; tag = "v0.1.4_4-alpha";
overlays = [ (import rust-overlay) ]; overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system overlays; inherit system overlays;

View File

@ -129,7 +129,7 @@ pub(crate) async fn guild_dashboard(
b.attribute("class", "container") b.attribute("class", "container")
.builder(Tag::Article, |b| { .builder(Tag::Article, |b| {
b.builder_text(Tag::Header, "Wow, you're a moderator") b.builder_text(Tag::Header, "Wow, you're a moderator")
.push_builder(moderator_dashboard(&state)) .push_builder(moderator_dashboard())
.builder_text(Tag::Footer, "End of super cool mod section") .builder_text(Tag::Footer, "End of super cool mod section")
}) })
}) })
@ -198,8 +198,8 @@ pub(crate) async fn guild_dashboard(
)) ))
} }
fn moderator_dashboard(state: &ApiState) -> HtmxBuilder { fn moderator_dashboard() -> HtmxBuilder {
HtmxBuilder::new(Tag::Empty).link("Go back to old UI", &format!("{}/old", state.origin)) HtmxBuilder::new(Tag::Empty)
} }
pub(crate) async fn login(State(state): State<ApiState>) -> Html<String> { pub(crate) async fn login(State(state): State<ApiState>) -> Html<String> {

View File

@ -222,10 +222,10 @@ pub(crate) async fn v2_auth(
// TODO: add permissions based on roles // TODO: add permissions based on roles
let mut cookie = Cookie::new("access_token", token.clone()); let mut cookie = Cookie::new("access_token", token.clone());
cookie.set_path(format!("{}/", state.origin)); cookie.set_path("/");
cookie.set_secure(true); cookie.set_secure(true);
Ok((jar.add(cookie), Redirect::to(&format!("{}/", state.origin)))) Ok((jar.add(cookie), Redirect::to("/")))
} }
pub(crate) async fn auth( pub(crate) async fn auth(