mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-22 23:22:27 -04:00
Implement staff display
This commit is contained in:
@@ -43,14 +43,16 @@ export const insertStaff = record(
|
||||
staffPk: ret.find((y) => y.slug === x.staff.slug)!.pk,
|
||||
kind: x.kind,
|
||||
order: i,
|
||||
character: {
|
||||
...x.character,
|
||||
image: enqueueOptImage(imgQueue, {
|
||||
url: x.character.image,
|
||||
table: roles,
|
||||
column: sql`${roles.character}['image']`,
|
||||
}),
|
||||
},
|
||||
character: x.character
|
||||
? {
|
||||
...x.character,
|
||||
image: enqueueOptImage(imgQueue, {
|
||||
url: x.character.image,
|
||||
table: roles,
|
||||
column: sql`${roles.character}['image']`,
|
||||
}),
|
||||
}
|
||||
: null,
|
||||
}));
|
||||
|
||||
await flushImageQueue(tx, imgQueue, -200);
|
||||
|
||||
@@ -35,12 +35,14 @@ export type Staff = typeof Staff.static;
|
||||
export const SeedStaff = t.Composite([
|
||||
t.Omit(Role, ["character"]),
|
||||
t.Object({
|
||||
character: t.Composite([
|
||||
t.Omit(Character, ["image"]),
|
||||
t.Object({
|
||||
image: t.Nullable(SeedImage),
|
||||
}),
|
||||
]),
|
||||
character: t.Nullable(
|
||||
t.Composite([
|
||||
t.Omit(Character, ["image"]),
|
||||
t.Object({
|
||||
image: t.Nullable(SeedImage),
|
||||
}),
|
||||
]),
|
||||
),
|
||||
staff: t.Composite([
|
||||
t.Object({
|
||||
slug: t.String({ format: "slug" }),
|
||||
|
||||
Reference in New Issue
Block a user