Fixed add stash in notifications panel. Fixed iframe ads breaking page width. Improved actor and movie tile size in search results.

This commit is contained in:
2024-08-29 17:53:54 +02:00
parent 33e8fbea0b
commit 0909e8d74c
9 changed files with 152 additions and 29 deletions

View File

@@ -1,7 +1,50 @@
import { fetchEntities } from '../entities.js';
import {
fetchEntities,
fetchEntitiesById,
} from '../entities.js';
export async function fetchEntitiesApi(req, res) {
const entities = await fetchEntities(req.query);
res.send(entities);
}
export const entitiesSchema = `
extend type Query {
entities(
query: String
limit: Int! = 30
page: Int! = 1
): EntitiesResult
entity(
id: Int!
): Entity
}
type EntitiesResult {
nodes: [Entity]
total: Int
}
type Entity {
id: Int!
name: String
slug: String
parent: Entity
}
`;
export async function fetchEntitiesGraphql(query, _req) {
const entities = await fetchEntities(query);
return {
nodes: entities,
};
}
export async function fetchEntitiesByIdGraphql(query, _req) {
const [entity] = await fetchEntitiesById([query.id]);
return entity;
}