github token support (#629)

* github token support

* sqlx-data

* renamed github, modrinth tokens

* removed prints
This commit is contained in:
Wyatt Verchere
2023-06-08 16:35:12 -07:00
committed by GitHub
parent abc99c7e69
commit b84d9c5d55
6 changed files with 89 additions and 10 deletions

View File

@@ -4,7 +4,6 @@ pub const ADMIN_KEY_HEADER: &str = "Modrinth-Admin";
pub fn admin_key_guard(ctx: &GuardContext) -> bool {
let admin_key = std::env::var("LABRINTH_ADMIN_KEY")
.expect("No admin key provided, this should have been caught by check_env_vars");
ctx.head()
.headers()
.get(ADMIN_KEY_HEADER)