Skip to content

Commit efc5527

Browse files
committed
chore: add privacy policy
1 parent c2e7d25 commit efc5527

File tree

5 files changed

+22
-15
lines changed

5 files changed

+22
-15
lines changed

api/src/meta/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ pub fn router() -> Router<AppState> {
3030

3131
pub fn setup(discord_bot: Arc<Client>) {
3232
info!("Spawning meta cache refresh task");
33-
tokio::spawn(refresh_meta_cache(discord_bot));
33+
if false {
34+
tokio::spawn(refresh_meta_cache(discord_bot));
35+
}
3436
}
3537

3638

@@ -94,7 +96,7 @@ async fn get_meta_guilds_id(
9496
icon: guild.icon,
9597
is_admin: u_guild.owner || u_guild.permissions & Permissions::ADMINISTRATOR == Permissions::ADMINISTRATOR,
9698
roles: guild.roles,
97-
channels: channels
99+
channels
98100
}
99101
)))
100102
}

api/src/middleware.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@ pub async fn auth_middleware(
1313
next: Next,
1414
) -> Result<Response, StatusCode> {
1515
// do something with `request`...
16-
println!("Attempting to authenticate user");
17-
1816
if headers.get("Authorization").is_none() {
1917
return Err(StatusCode::UNAUTHORIZED);
2018
}
2119

2220
let auth_header = headers.get("Authorization").unwrap().to_str().unwrap();
2321
let (scheme, credentials) = auth_header.split_once(' ').unwrap();
24-
println!("credentials: {credentials}");
2522
if scheme == "Discord" {
2623
let client = Client::new(format!("Bearer {credentials}"));
2724
let current_user = get_current_user(&client).await?;

infra/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,21 @@ provider "aws" {}
2626
# }
2727

2828
module "lambda" {
29+
count = var.deployment_env == "local" ? 0 : 1
2930
source = "./modules/compute/lambda"
3031
deployment_env = var.deployment_env
3132
discord_bot_token = var.discord_bot_token
3233
discord_public_key = var.discord_public_key
3334
}
3435

3536
module "s3" {
37+
count = var.deployment_env == "local" ? 0 : 1
3638
source = "./modules/data/s3"
3739
deployment_env = var.deployment_env
3840
}
3941

4042
module "api" {
43+
count = var.deployment_env == "local" ? 0 : 1
4144
source = "./modules/api/api-gateway"
4245
deployment_env = var.deployment_env
4346
root_domain_name = var.root_domain_name

ui/src/components/MainWithFooter.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ import {redirectTo} from "../helpers/redirect.js";
2323
<a @click="redirectTo('https://github.com/KoalaBotUK')" class="btn btn-ghost"> <fa :icon="['fab', 'github']" size="xl"/></a>
2424
</nav>
2525
<nav class="justify-end" aria-label="Theme Toggle">
26+
<div class="block">
27+
<a href="https://legal.koalabot.uk" class="link">Privacy Policy</a>
2628
<ThemeToggle/>
29+
</div>
2730
</nav>
2831

2932
</footer>

ui/src/pages/LoginView.vue

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import DiscordAuthButton from "../components/auth/DiscordAuthButton.vue";
33
import {isUserLoggedIn, User} from "../stores/user.js";
44
import {onMounted, ref} from "vue";
55
import {internalRedirect, reload} from "../helpers/redirect.js";
6+
import MainWithFooter from "../components/MainWithFooter.vue";
67
78
function setPrePath() {
89
let lastPath = localStorage.getItem('lastPath');
@@ -29,19 +30,20 @@ if (isUserLoggedIn(user.value)) {
2930
</script>
3031

3132
<template>
32-
<div class="hero bg-base-200 min-h-screen">
33-
<div class="hero-content flex-col lg:flex-col">
34-
<div class="card bg-base-100 w-full max-w-sm shrink-0 shadow-2xl">
35-
<div class="card-body">
36-
<h2 class="card-title">
37-
Login to Koala
38-
</h2>
39-
<DiscordAuthButton longText="true" :user="user" @logout="reload"></DiscordAuthButton>
33+
<MainWithFooter>
34+
<div class="flex justify-center w-full lg:mt-20">
35+
<div class="card lg:card-side w-auto bg-base-100 shadow-xl">
36+
<div class="card-body flex flex-col justify-items-center">
37+
<h1 class="card-title text-xl font-bold self-center">Login to Koala</h1>
38+
<p>By logging in, you agree to our
39+
<a href="https://legal.koalabot.uk" class="link">Privacy Policy</a>
40+
</p>
41+
<DiscordAuthButton longText="true" :user="user" @logout="reload"></DiscordAuthButton>
4042
<a class="btn btn-neutral btn-soft btn-sm" href="/">Back</a>
4143
</div>
42-
</div>
43-
</div>
4444
</div>
45+
</div>
46+
</MainWithFooter>
4547
</template>
4648

4749
<style scoped>

0 commit comments

Comments
 (0)