-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(backend): move func to mod parent * feat(backend): add models for storing reviews * refactor(backend): hoist common code to module * fix(backend): add metadata field to review * fix(backend): add visibility field for review * fix(backend): use correct number for migration * chore(backend): generate entities for reviews * feat(backend): make review rating optional * fix(backend): fetch correct authors for movies * fix(backend): use correct author names for shows * fix(frontend): do not display author names for shows * fix(backend): wrong page being used for audible search * fix(frontend): carousel height * build(frontend): add humaize duration deps * feat(frontend): display humaized durations on dashboard * fix(frontend): autofocus fields * feat(backend): add skeleton for reviews resolver * feat(backend): add resolver to post/update a review * chore(graphql): add mutation to post a review * feat(backend): add resolver to get reviews for a media item * chore(graphql): add query to get reviews * feat(backend): return user id from reviews endpoint * fix(backend): return only public reviews from endpoint * chore(graphql): get posted on date * feat(frontend): display reviews for media item * feat(backend): make rating a decimal * chore(generated): re-generate types * fix(frontend): add autosize component around reviews panel * fix(backend): make visibility field optional * feat(frontend): add page to post review * ci: update rome to nightly * ci(frontend): apply linting warning * fix(frontend): make reviews stacked * feat(frontend): allow updating reviews * fix(backend): arrange posts in reverse order * chore(graphql): return user id from resolver * feat(frontend): add button to edit review * fix(frontend): remove `staletime` option from most queries * docs: add full form of project
- Loading branch information
Showing
41 changed files
with
943 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
FROM ignisda/archlinux:latest | ||
|
||
USER root | ||
RUN curl -L https://github.com/rome/tools/releases/download/cli%2Fv12.0.0/rome-linux-x64 -o /usr/bin/rome | ||
RUN chmod +x /usr/bin/rome | ||
|
||
USER $USERNAME | ||
RUN cargo binstall sea-orm-cli --locked --secure --no-confirm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
[[language]] | ||
name = "typescript" | ||
auto-format = true | ||
formatter = { command = "rome", args = ["format", "--stdin-file-path", "source.ts"] } | ||
formatter = { command = "npx", args = ["rome", "format", "--stdin-file-path", "source.ts"] } | ||
|
||
[[language]] | ||
name = "javascript" | ||
auto-format = true | ||
formatter = { command = "rome", args = ["format", "--stdin-file-path", "source.js"] } | ||
formatter = { command = "npx", args = ["rome", "format", "--stdin-file-path", "source.js"] } | ||
|
||
[[language]] | ||
name = "json" | ||
auto-format = true | ||
formatter = { command = "rome", args = ["format", "--stdin-file-path", "source.json"] } | ||
formatter = { command = "npx", args = ["rome", "format", "--stdin-file-path", "source.json"] } | ||
|
||
[[language]] | ||
name = "tsx" | ||
auto-format = true | ||
formatter = { command = "rome", args = ["format", "--stdin-file-path", "source.tsx"] } | ||
formatter = { command = "npx", args = ["rome", "format", "--stdin-file-path", "source.tsx"] } | ||
|
||
[[language]] | ||
name = "jsx" | ||
auto-format = true | ||
formatter = { command = "rome", args = ["format", "--stdin-file-path", "source.jsx"] } | ||
formatter = { command = "npx", args = ["rome", "format", "--stdin-file-path", "source.jsx"] } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2 | ||
|
||
use rust_decimal::Decimal; | ||
use sea_orm::entity::prelude::*; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::migrator::Visibility; | ||
|
||
use super::utils::SeenExtraInformation; | ||
|
||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] | ||
#[sea_orm(table_name = "review")] | ||
pub struct Model { | ||
#[sea_orm(primary_key)] | ||
pub id: i32, | ||
pub posted_on: DateTimeUtc, | ||
pub rating: Option<Decimal>, | ||
pub text: Option<String>, | ||
pub visibility: Visibility, | ||
pub user_id: i32, | ||
pub metadata_id: i32, | ||
pub extra_information: Option<SeenExtraInformation>, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] | ||
pub enum Relation { | ||
#[sea_orm( | ||
belongs_to = "super::metadata::Entity", | ||
from = "Column::MetadataId", | ||
to = "super::metadata::Column::Id", | ||
on_update = "Cascade", | ||
on_delete = "Cascade" | ||
)] | ||
Metadata, | ||
#[sea_orm( | ||
belongs_to = "super::user::Entity", | ||
from = "Column::UserId", | ||
to = "super::user::Column::Id", | ||
on_update = "Cascade", | ||
on_delete = "Cascade" | ||
)] | ||
User, | ||
} | ||
|
||
impl Related<super::metadata::Entity> for Entity { | ||
fn to() -> RelationDef { | ||
Relation::Metadata.def() | ||
} | ||
} | ||
|
||
impl Related<super::user::Entity> for Entity { | ||
fn to() -> RelationDef { | ||
Relation::User.def() | ||
} | ||
} | ||
|
||
impl ActiveModelBehavior for ActiveModel {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ mod graphql; | |
mod media; | ||
mod migrator; | ||
mod movies; | ||
mod reviews; | ||
mod shows; | ||
mod users; | ||
mod utils; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.