Skip to content

Commit

Permalink
Fix and update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
HeavenVolkoff committed Apr 18, 2024
1 parent 9517bf0 commit 0ce0079
Show file tree
Hide file tree
Showing 16 changed files with 359 additions and 353 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ indent_style = space
# Prisma
# https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-schema/data-model#formatting
[*.prisma]
indent_size = 4
indent_size = 2
indent_style = space

# YAML
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/components/modal/inspector/FileInfoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ const FileInfoModal = forwardRef<ModalRef, FileInfoModalProps>((props, ref) => {
value={`${byteSize(filePathData?.size_in_bytes_bytes)}`}
/>
{/* Duration */}
{/* {fullObjectData.data?.media_data?.duration && (
{/* {fullObjectData.data?.exif_data?.duration && (
<MetaItem
title="Duration"
value={fullObjectData.data.media_data.duration}
value={fullObjectData.data.exif_data.duration}
icon={Clock}
/>
)} */}
Expand Down
12 changes: 6 additions & 6 deletions apps/server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use axum::{
extract::{FromRequestParts, State},
headers::{authorization::Basic, Authorization},
http::Request,
middleware::{self, Next},
middleware::Next,
response::{IntoResponse, Response},
routing::get,
TypedHeader,
Expand All @@ -29,7 +29,7 @@ async fn basic_auth<B>(
request: Request<B>,
next: Next<B>,
) -> Response {
let request = if state.auth.len() != 0 {
let request = if !state.auth.is_empty() {
let (mut parts, body) = request.into_parts();

let Ok(TypedHeader(Authorization(hdr))) =
Expand All @@ -46,7 +46,7 @@ async fn basic_auth<B>(
if state
.auth
.get(hdr.username())
.and_then(|pass| Some(*pass == SecStr::from(hdr.password())))
.map(|pass| *pass == SecStr::from(hdr.password()))
!= Some(true)
{
return Response::builder()
Expand Down Expand Up @@ -110,7 +110,7 @@ async fn main() {
.into_iter()
.enumerate()
.filter_map(|(i, s)| {
if s.len() == 0 {
if s.is_empty() {
return None;
}

Expand All @@ -133,7 +133,7 @@ async fn main() {
};

// We require credentials in production builds (unless explicitly disabled)
if auth.len() == 0 && !disabled {
if auth.is_empty() && !disabled {
#[cfg(not(debug_assertions))]
{
warn!("The 'SD_AUTH' environment variable is not set!");
Expand All @@ -143,7 +143,7 @@ async fn main() {
}
}

let state = AppState { auth };
let _state = AppState { auth };

let (node, router) = match Node::new(
data_dir,
Expand Down
4 changes: 2 additions & 2 deletions core/crates/prisma-helpers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ file_path::select!(file_path_to_full_path {
// File Path includes!
file_path::include!(file_path_with_object {
object: include {
media_data: select {
exif_data: select {
resolution
media_date
media_location
Expand All @@ -161,7 +161,7 @@ object::select!(object_for_file_identifier {
object::include!(object_with_file_paths {
file_paths: include {
object: include {
media_data: select {
exif_data: select {
resolution
media_date
media_location
Expand Down
1 change: 1 addition & 0 deletions core/crates/sync/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![recursion_limit = "256"]
#![allow(clippy::unwrap_used, clippy::panic)] // TODO: Brendan remove this once you've got error handling here

mod actor;
Expand Down
Loading

0 comments on commit 0ce0079

Please sign in to comment.