mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
fix types
This commit is contained in:
@@ -52,7 +52,7 @@ MULTIPLE_SPACE_PATTERN = re.compile(r"\s+")
|
||||
|
||||
class BaseRom(TypedDict):
|
||||
name: NotRequired[str]
|
||||
sort_name: NotRequired[str]
|
||||
sort_name: NotRequired[str | None]
|
||||
summary: NotRequired[str]
|
||||
url_cover: NotRequired[str]
|
||||
url_screenshots: NotRequired[list[str]]
|
||||
|
||||
@@ -33,3 +33,4 @@ export type Body_update_rom_api_roms__id__put = {
|
||||
url_cover?: (string | null);
|
||||
url_manual?: (string | null);
|
||||
};
|
||||
|
||||
|
||||
@@ -101,3 +101,4 @@ export type DetailedRomSchema = {
|
||||
user_collections: Array<UserCollectionSchema>;
|
||||
all_user_notes: Array<UserNoteSchema>;
|
||||
};
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export type RomGamelistMetadata = {
|
||||
video_url?: (string | null);
|
||||
rating?: (number | null);
|
||||
first_release_date?: (string | null);
|
||||
sort_name?: (string | null);
|
||||
companies?: (Array<string> | null);
|
||||
franchises?: (Array<string> | null);
|
||||
genres?: (Array<string> | null);
|
||||
|
||||
@@ -91,3 +91,4 @@ export type SimpleRomSchema = {
|
||||
files: Array<RomFileSchema>;
|
||||
sibling_roms: Array<SiblingRomSchema>;
|
||||
};
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ async function updateRom({
|
||||
|
||||
const fields: FormInputField<UpdateRomInput>[] = [
|
||||
["name", rom.name],
|
||||
["sort_name", rom.sort_name],
|
||||
["sort_name", rom.sort_name ?? ""],
|
||||
["fs_name", rom.fs_name],
|
||||
["summary", rom.summary],
|
||||
["igdb_id", toFormIdValue(rom.igdb_id)],
|
||||
|
||||
@@ -109,6 +109,7 @@ const syntheticRom = computed<SimpleRom>(() => ({
|
||||
fs_path: "",
|
||||
fs_size_bytes: 0,
|
||||
name: props.game.name,
|
||||
sort_name: props.game.name,
|
||||
slug: props.game.slug,
|
||||
summary: null,
|
||||
alternative_names: [],
|
||||
|
||||
Reference in New Issue
Block a user