Compare commits
3 Commits
06ed48f4cf
...
17ec2185d0
Author | SHA1 | Date |
---|---|---|
|
17ec2185d0 | |
|
25bb24694c | |
|
83a0eadf6d |
|
@ -8,7 +8,7 @@
|
|||
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
tag = "v0.1.4_4-alpha";
|
||||
tag = "super_test";
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
|
|
|
@ -129,7 +129,7 @@ pub(crate) async fn guild_dashboard(
|
|||
b.attribute("class", "container")
|
||||
.builder(Tag::Article, |b| {
|
||||
b.builder_text(Tag::Header, "Wow, you're a moderator")
|
||||
.push_builder(moderator_dashboard())
|
||||
.push_builder(moderator_dashboard(&state))
|
||||
.builder_text(Tag::Footer, "End of super cool mod section")
|
||||
})
|
||||
})
|
||||
|
@ -198,8 +198,8 @@ pub(crate) async fn guild_dashboard(
|
|||
))
|
||||
}
|
||||
|
||||
fn moderator_dashboard() -> HtmxBuilder {
|
||||
HtmxBuilder::new(Tag::Empty)
|
||||
fn moderator_dashboard(state: &ApiState) -> HtmxBuilder {
|
||||
HtmxBuilder::new(Tag::Empty).link("Go back to old UI", &format!("{}/old", state.origin))
|
||||
}
|
||||
|
||||
pub(crate) async fn login(State(state): State<ApiState>) -> Html<String> {
|
||||
|
|
|
@ -222,10 +222,10 @@ pub(crate) async fn v2_auth(
|
|||
// TODO: add permissions based on roles
|
||||
|
||||
let mut cookie = Cookie::new("access_token", token.clone());
|
||||
cookie.set_path("/");
|
||||
cookie.set_path(format!("{}/", state.origin));
|
||||
cookie.set_secure(true);
|
||||
|
||||
Ok((jar.add(cookie), Redirect::to("/")))
|
||||
Ok((jar.add(cookie), Redirect::to(&format!("{}/", state.origin))))
|
||||
}
|
||||
|
||||
pub(crate) async fn auth(
|
||||
|
|
Loading…
Reference in New Issue