diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index ff62841a0c..955f53bbc1 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -177,7 +177,7 @@ export default define(meta, paramDef, async (ps, user) => { userId: user.id, fileIds, }) - .orderBy('array_position(ARRAY[:...fileIds], "id")') + .orderBy('array_position(ARRAY[:...fileIds], "id"::text)') .setParameters({ fileIds }) .getMany(); }