fix : remove unused colum in database
This commit is contained in:
@@ -430,8 +430,6 @@ export async function setGuideVisibility(
|
||||
input: {
|
||||
isPublic: boolean;
|
||||
expectedVersion: number;
|
||||
catalogVersion?: string;
|
||||
publicationNote?: string | null;
|
||||
},
|
||||
) {
|
||||
return getDb().transaction(async (tx) => {
|
||||
@@ -442,8 +440,6 @@ export async function setGuideVisibility(
|
||||
version: sql`${guides.version} + 1`,
|
||||
...(input.isPublic ? {
|
||||
publishedAt: new Date(),
|
||||
publishedCatalogVersion: input.catalogVersion,
|
||||
publicationNote: input.publicationNote ?? null,
|
||||
} : {}),
|
||||
})
|
||||
.where(and(
|
||||
|
||||
@@ -6,7 +6,6 @@ const complete = {
|
||||
exists: true,
|
||||
overview: "Build overview",
|
||||
coverReady: true,
|
||||
catalogVersion: "6.0",
|
||||
renderableSectionCount: 1,
|
||||
version: 4,
|
||||
expectedVersion: 4,
|
||||
@@ -22,13 +21,11 @@ describe("publicationIssues", () => {
|
||||
...complete,
|
||||
overview: " ",
|
||||
coverReady: false,
|
||||
catalogVersion: null,
|
||||
renderableSectionCount: 0,
|
||||
expectedVersion: 3,
|
||||
})).toEqual([
|
||||
"กรุณากรอก Overview",
|
||||
"รูปปกยังไม่พร้อมใช้งาน",
|
||||
"กรุณา Sync Catalog ก่อนเผยแพร่",
|
||||
"กรุณาเพิ่มเนื้อหาอย่างน้อยหนึ่ง Section",
|
||||
"Guide ถูกแก้ไขแล้ว กรุณาลองใหม่",
|
||||
]);
|
||||
|
||||
@@ -2,7 +2,6 @@ export interface PublicationCheckInput {
|
||||
exists: boolean;
|
||||
overview: string;
|
||||
coverReady: boolean;
|
||||
catalogVersion: string | null;
|
||||
renderableSectionCount: number;
|
||||
version: number;
|
||||
expectedVersion: number;
|
||||
@@ -13,7 +12,6 @@ export function publicationIssues(input: PublicationCheckInput): string[] {
|
||||
const issues: string[] = [];
|
||||
if (!input.overview.trim()) issues.push("กรุณากรอก Overview");
|
||||
if (!input.coverReady) issues.push("รูปปกยังไม่พร้อมใช้งาน");
|
||||
if (!input.catalogVersion) issues.push("กรุณา Sync Catalog ก่อนเผยแพร่");
|
||||
if (input.renderableSectionCount === 0) issues.push("กรุณาเพิ่มเนื้อหาอย่างน้อยหนึ่ง Section");
|
||||
if (input.version !== input.expectedVersion) issues.push("Guide ถูกแก้ไขแล้ว กรุณาลองใหม่");
|
||||
return issues;
|
||||
|
||||
@@ -241,7 +241,6 @@ export async function listPublicGuideCards() {
|
||||
version: guides.version,
|
||||
updatedAt: guides.updatedAt,
|
||||
publishedAt: guides.publishedAt,
|
||||
publishedCatalogVersion: guides.publishedCatalogVersion,
|
||||
element: catalogCharacters.element,
|
||||
weaponType: catalogCharacters.weaponType,
|
||||
rarity: catalogCharacters.rarity,
|
||||
|
||||
Reference in New Issue
Block a user