Skip to content

Commit

Permalink
fix(api): Add
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Mar 10, 2024
1 parent ce5608a commit 8571bc8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 67 deletions.
17 changes: 2 additions & 15 deletions api/add/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,7 @@ document.addEventListener("DOMContentLoaded", () => {
*/
const typeInput = document.querySelector("#type");

/**
* @type {HTMLSelectElement | null}
*/
const sortSelect = document.querySelector("#sort-select");

if (
!nameInput ||
!sourceIdInput ||
!typeInput ||
!loader ||
!platform ||
!platformSelect ||
!sortSelect
) {
if (!nameInput || !sourceIdInput || !typeInput || !loader || !platform || !platformSelect) {
console.error("Missing required elements:");
console.error("nameInput", nameInput);
console.error("sourceIdInput", sourceIdInput);
Expand Down Expand Up @@ -203,7 +190,7 @@ async function getDataForType(type, query) {
) => ({
name: result.title ?? result.name,
id: result.id,
poster_path: "https://image.tmdb.org/t/p/w300/" + result.poster_path,
poster_path: `https://image.tmdb.org/t/p/w300/${result.poster_path}`,
type,
}),
);
Expand Down
1 change: 0 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { CollectionEntry } from "astro:content";
export { monthYearDate, readableDate } from "./dateTools";
export { getPlaceholderURL } from "./placeholder";

export function getURLFromEntry(
item: CollectionEntry<"blog"> | CollectionEntry<"projects"> | CollectionEntry<"wiki">,
Expand Down
51 changes: 0 additions & 51 deletions src/utils/placeholder.ts

This file was deleted.

0 comments on commit 8571bc8

Please sign in to comment.