Skip to content

Commit

Permalink
Merge pull request #66 from takker99:backup
Browse files Browse the repository at this point in the history
fix(api): Adjust the response definition of /api/project-backup/:projectname/:backupId.json
  • Loading branch information
takker99 authored Feb 9, 2025
2 parents 5c1e31e + 0f2f1b8 commit 07e78c2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions api/project-backup/project/backupId.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import type { BaseLine, StringLc, UnixTime } from "../../../base.ts";
import type { UserForExport } from "../../page-data/export/project.ts";
import type { Page } from "../../pages/project/title.ts";

/** backupされるページデータ */
export interface BackupedPage
extends Pick<Page, "title" | "updated" | "created" | "id"> {
extends Pick<Page, "title" | "updated" | "created" | "id" | "views"> {
/** ページ本文 */
lines: Pick<BaseLine, "text" | "created" | "updated">[];
lines: Pick<BaseLine, "text" | "created" | "updated" | "userId">[];

/** ページに含まれているリンク*/
linksLc: StringLc[];
}

/** project backup data */
/** project backup data got from /api/project-backup/:projectname/:backupId.json */
export interface BackupData {
/** project's name */
name: string;
Expand All @@ -22,6 +23,9 @@ export interface BackupData {
/** このデータを生成した日時 (UNIX時刻) */
exported: UnixTime;

/** project members */
users: UserForExport[];

/** backuped pages */
pages: BackupedPage[];
}

0 comments on commit 07e78c2

Please sign in to comment.