Fix mistake

This commit is contained in:
2025-10-05 15:05:50 +02:00
parent 7d747f1874
commit 270e9bb8d3
3 changed files with 6 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ interface omdbRes {
Response: string, Response: string,
Poster: string, Poster: string,
Type: string, Type: string,
ImdbID: string, imdbID: string,
Year: string, Year: string,
} }
@@ -63,7 +63,7 @@ async function createMed(req: Request, res: Response) {
const media: Media = { const media: Media = {
id: 0, id: 0,
code: mData.ImdbID, code: mData.imdbID,
title: mData.Title, title: mData.Title,
released: mData.Released, released: mData.Released,
webImg: "", webImg: "",
@@ -85,7 +85,7 @@ async function createMed(req: Request, res: Response) {
} }
const savedMedia = MediaModel.save(tableType, "", mData.Title, mData.Released, mData.Poster, mData.ImdbID, mData.Year); const savedMedia = MediaModel.save(tableType, mData.imdbID, mData.Title, mData.Released, "", mData.Poster, mData.Year);
await downloadImage(media, tableType); await downloadImage(media, tableType);
res.status(201).json(media); res.status(201).json(media);

View File

@@ -5,7 +5,7 @@ const pool = new Database("mydb.sqlite", { strict: true });
pool.run(` pool.run(`
CREATE TABLE IF NOT EXISTS series ( CREATE TABLE IF NOT EXISTS series (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,
code INT NOT NULL, code TEXT NOT NULL,
title TEXT NOT NULL, title TEXT NOT NULL,
released TEXT NOT NULL, released TEXT NOT NULL,
webImg TEXT NOT NULL, webImg TEXT NOT NULL,
@@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS series (
pool.run(` pool.run(`
CREATE TABLE IF NOT EXISTS movies ( CREATE TABLE IF NOT EXISTS movies (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,
code INT NOT NULL, code TEXT NOT NULL,
title TEXT NOT NULL, title TEXT NOT NULL,
released TEXT NOT NULL, released TEXT NOT NULL,
webImg TEXT NOT NULL, webImg TEXT NOT NULL,
@@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS movies (
pool.run(` pool.run(`
CREATE TABLE IF NOT EXISTS games ( CREATE TABLE IF NOT EXISTS games (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,
code INT NOT NULL, code TEXT NOT NULL,
title TEXT NOT NULL, title TEXT NOT NULL,
released TEXT NOT NULL, released TEXT NOT NULL,
webImg TEXT NOT NULL, webImg TEXT NOT NULL,

View File

@@ -1,6 +0,0 @@
+++
title = "Contact"
slug = "contact"
+++
Follow me, .