Files
outline/server/presenters/attachment.ts
eaf2fd102e Add attachments.list API endpoint (#9259)
* Add attachments.list endpoint to retrieve user's attachments

* Fix TypeScript error in attachments.list endpoint

* Address review comments: restore tests, properly type WhereOptions, remove comments

* fix: Pagination, user filtering

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Codegen Bot <codegen@example.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-05-20 19:25:55 -04:00

14 lines
345 B
TypeScript

import { Attachment } from "@server/models";
export default function presentAttachment(attachment: Attachment) {
return {
userId: attachment.userId,
documentId: attachment.documentId,
contentType: attachment.contentType,
name: attachment.name,
id: attachment.id,
url: attachment.url,
size: attachment.size,
};
}