server-ts: Convert routes/api/attachments

This commit is contained in:
Elian Doran
2024-04-05 20:16:46 +03:00
parent b13ad5d01e
commit 9330241045
3 changed files with 20 additions and 18 deletions

View File

@@ -4,7 +4,8 @@ import protectedSessionService = require('./protected_session');
import utils = require('./utils');
import type { Blob } from "./blob-interface";
function getBlobPojo(entityName: string, entityId: string) {
function getBlobPojo(entityName: string, entityId: string, opts?: { preview: boolean }) {
// TODO: Unused opts.
const entity = becca.getEntity(entityName, entityId);
if (!entity) {
throw new NotFoundError(`Entity ${entityName} '${entityId}' was not found.`);