mirror of
https://github.com/outline/outline.git
synced 2026-11-29 08:39:20 +03:00
* add migration file * documents.export API * download dialog * file ops list item * export task * download modal styling * cleanup * lint * Restore individual download actions --------- Co-authored-by: Tom Moor <tom@getoutline.com>
24 lines
613 B
TypeScript
24 lines
613 B
TypeScript
import path from "path";
|
|
import type { FileOperation } from "@server/models";
|
|
import { presentUser } from ".";
|
|
|
|
export default function presentFileOperation(data: FileOperation) {
|
|
return {
|
|
id: data.id,
|
|
type: data.type,
|
|
format: data.format,
|
|
name:
|
|
data.collection?.name ||
|
|
data.document?.titleWithDefault ||
|
|
path.basename(data.key || ""),
|
|
state: data.state,
|
|
error: data.error,
|
|
size: data.size,
|
|
collectionId: data.collectionId,
|
|
documentId: data.documentId,
|
|
user: presentUser(data.user),
|
|
createdAt: data.createdAt,
|
|
updatedAt: data.updatedAt,
|
|
};
|
|
}
|