marks
This commit is contained in:
parent
360675f6f9
commit
a320b99aa3
10 changed files with 79 additions and 44 deletions
|
|
@ -57,6 +57,8 @@ impl Games for HttpClient {
|
|||
slug,
|
||||
vndb,
|
||||
release_date,
|
||||
tags,
|
||||
genres,
|
||||
}| {
|
||||
(
|
||||
"/games".into(),
|
||||
|
|
@ -65,6 +67,8 @@ impl Games for HttpClient {
|
|||
description,
|
||||
thumbnail,
|
||||
author,
|
||||
tags,
|
||||
genres,
|
||||
slug,
|
||||
vndb,
|
||||
release_date,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use crate::requests::status_code;
|
|||
use viendesu_core::{
|
||||
errors,
|
||||
requests::games as reqs,
|
||||
types::{Patch, author, file, game},
|
||||
types::{Patch, author, file, game, mark},
|
||||
};
|
||||
|
||||
#[data]
|
||||
|
|
@ -15,9 +15,9 @@ pub struct Update {
|
|||
pub description: Patch<Option<game::Description>>,
|
||||
pub slug: Patch<game::Slug>,
|
||||
pub thumbnail: Patch<Option<file::Id>>,
|
||||
pub genres: Patch<game::Genres>,
|
||||
pub badges: Patch<game::Badges>,
|
||||
pub tags: Patch<game::Tags>,
|
||||
pub genres: Patch<mark::Genres>,
|
||||
pub badges: Patch<mark::Badges>,
|
||||
pub tags: Patch<mark::Tags>,
|
||||
pub screenshots: Patch<game::Screenshots>,
|
||||
pub published: Patch<bool>,
|
||||
}
|
||||
|
|
@ -62,6 +62,10 @@ pub struct Create {
|
|||
pub thumbnail: Option<file::Id>,
|
||||
pub author: author::Id,
|
||||
pub slug: Option<game::Slug>,
|
||||
#[serde(default)]
|
||||
pub tags: mark::Tags,
|
||||
#[serde(default)]
|
||||
pub genres: mark::Genres,
|
||||
pub vndb: Option<game::VndbId>,
|
||||
pub release_date: Option<game::ReleaseDate>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -350,6 +350,8 @@ fn games<T: Types>(router: RouterScope<T>) -> RouterScope<T> {
|
|||
title,
|
||||
description,
|
||||
thumbnail,
|
||||
tags,
|
||||
genres,
|
||||
author,
|
||||
slug,
|
||||
vndb,
|
||||
|
|
@ -364,6 +366,8 @@ fn games<T: Types>(router: RouterScope<T>) -> RouterScope<T> {
|
|||
thumbnail,
|
||||
author,
|
||||
slug,
|
||||
tags,
|
||||
genres,
|
||||
vndb,
|
||||
release_date,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue