diff --git a/src/types/mod_json.rs b/src/types/mod_json.rs
index aa74f08..d142ceb 100644
--- a/src/types/mod_json.rs
+++ b/src/types/mod_json.rs
@@ -1,20 +1,14 @@
-use std::{
- fs::{remove_file, File},
- io::{Cursor, Read, Seek},
- os::unix::fs::MetadataExt,
-};
+use std::io::{Cursor, Read, Seek};
-use actix_web::{web::Bytes, CustomizeResponder};
+use actix_web::web::Bytes;
use image::{
codecs::png::{PngDecoder, PngEncoder},
- io::Reader,
- DynamicImage, EncodableLayout, GenericImageView, ImageDecoder, ImageEncoder,
+ DynamicImage, GenericImageView, ImageEncoder,
};
use semver::Version;
use serde::Deserialize;
use std::io::BufReader;
-use uuid::Uuid;
-use zip::read::{self, ZipFile};
+use zip::read::ZipFile;
use super::{
api::ApiError,
diff --git a/src/types/models/developer.rs b/src/types/models/developer.rs
index bb1ce02..ed36727 100644
--- a/src/types/models/developer.rs
+++ b/src/types/models/developer.rs
@@ -5,10 +5,12 @@ use sqlx::{PgConnection, Postgres, QueryBuilder};
use crate::types::api::ApiError;
+#[derive(Serialize, Clone, Debug)]
pub struct Developer {
pub id: i32,
pub username: String,
pub display_name: String,
+ pub is_owner: bool,
}
pub struct FetchedDeveloper {
@@ -19,16 +21,6 @@ pub struct FetchedDeveloper {
pub admin: bool,
}
-#[derive(Serialize, Clone, Debug)]
-pub struct ModDeveloper {
- pub id: i32,
- pub username: String,
- pub display_name: String,
- pub verified: bool,
- pub admin: bool,
- pub is_owner: bool
-}
-
impl Developer {
pub async fn create(
github_id: i64,
@@ -60,10 +52,10 @@ impl Developer {
pub async fn get_by_github_id(
github_id: i64,
pool: &mut PgConnection,
- ) -> Result