Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move task creation functions to util module #17

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ target
.target
.env
data
.cargo
.cargo
.vscode
3 changes: 2 additions & 1 deletion src/api/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ use tokio::sync::mpsc::{channel, Sender};

use crate::db::admin::insert_projects;
use crate::util::parse_csv::devpost_integration;
use crate::util::tasks::NewSender;
use crate::{
db::admin::aggregate_stats,
util::types::{AdminLogin, Stats},
};

use super::{tasks::NewSender, util::AdminPassword};
use super::util::AdminPassword;

#[rocket::post("/admin/login", data = "<body>")]
pub async fn login(body: Json<AdminLogin<'_>>) -> (Status, String) {
Expand Down
1 change: 0 additions & 1 deletion src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ pub mod client;
pub mod guards;
pub mod judge;
pub mod request_types;
pub mod tasks;
pub mod util;
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use dotenv::dotenv;
use jury::api::client::CORS;
use jury::api::tasks::init_threads;
use jury::util::tasks::init_threads;
use rocket::fs::{relative, FileServer};
use std::env;
use std::sync::Arc;
Expand Down
1 change: 1 addition & 0 deletions src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ pub mod check_env;
pub mod crowd_bt;
pub mod parse_csv;
pub mod types;
pub mod tasks;
File renamed without changes.