Skip to content

Commit db82f7d

Browse files
authored
Use proxy for uploading files (#729)
* fix(backend): handle integrations progress correctly * fix(frontend): round up seen progress * fix(frontend): use proxy for uploading files * build(backend): bump version
1 parent 5f356c9 commit db82f7d

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/backend/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ryot"
3-
version = "4.3.13"
3+
version = "4.3.14"
44
edition = "2021"
55
repository = "https://github.com/IgnisDa/ryot"
66
license = "GPL-3.0"

apps/backend/src/miscellaneous/resolver.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -6095,11 +6095,14 @@ impl MiscellaneousService {
60956095
}
60966096

60976097
async fn integration_progress_update(&self, pu: IntegrationMedia, user_id: i32) -> Result<()> {
6098-
let limit = Decimal::from_i32(self.config.integration.minimum_progress_limit).unwrap();
6099-
if pu.progress < limit {
6098+
let maximum_limit =
6099+
Decimal::from_i32(self.config.integration.maximum_progress_limit).unwrap();
6100+
let minimum_limit =
6101+
Decimal::from_i32(self.config.integration.minimum_progress_limit).unwrap();
6102+
if pu.progress < minimum_limit {
61006103
return Ok(());
61016104
}
6102-
let progress = if pu.progress > limit {
6105+
let progress = if pu.progress > maximum_limit {
61036106
dec!(100)
61046107
} else {
61056108
pu.progress

apps/frontend/app/lib/utilities.server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { zx } from "zodix";
3131
import { redirectToQueryParam } from "./generals";
3232

3333
const isProduction = process.env.NODE_ENV === "production";
34-
export const API_URL = process.env.API_URL || "http://localhost:5000";
34+
export const API_URL = process.env.API_URL || "http://localhost:8000/backend";
3535

3636
export const gqlClient = new GraphQLClient(`${API_URL}/graphql`, {
3737
headers: { Connection: "keep-alive" },

apps/frontend/app/routes/_dashboard.media.item.$id._index.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,11 @@ export default function Page() {
777777
<Alert icon={<IconAlertCircle />} variant="outline">
778778
You are currently{" "}
779779
{getVerb(Verb.Read, loaderData.mediaMainDetails.lot)}
780-
ing this ({userMetadataDetails.inProgress.progress}%)
780+
ing this (
781+
{Number(userMetadataDetails.inProgress.progress).toFixed(
782+
2,
783+
)}
784+
%)
781785
</Alert>
782786
) : null}
783787
</>
@@ -2434,7 +2438,7 @@ const SeenItem = (props: {
24342438
<Text fw="bold">
24352439
{changeCase(props.history.state)}{" "}
24362440
{props.history.progress !== "100"
2437-
? `(${props.history.progress}%)`
2441+
? `(${Number(props.history.progress).toFixed(2)}%)`
24382442
: null}
24392443
</Text>
24402444
{displayAllInformation ? (

0 commit comments

Comments
 (0)