kaneo (minimalist kanban) fork to experiment adding a tangled integration github.com/usekaneo/kaneo
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: remove unnecessary testing changes

Tin cd7bd4c4 17de4b3c

+4 -25
-13
apps/api/src/storage/s3.ts
··· 1 1 import { Readable } from "node:stream"; 2 2 import { 3 3 GetObjectCommand, 4 - HeadObjectCommand, 5 4 PutObjectCommand, 6 5 S3Client, 7 6 type S3ClientConfig, ··· 267 266 ) { 268 267 const prefix = `${buildObjectKeyPrefix(context)}/`; 269 268 return key.startsWith(prefix); 270 - } 271 - 272 - export async function assertObjectExists(key: string) { 273 - const config = getStorageConfig(); 274 - const client = getClient(config); 275 - 276 - await client.send( 277 - new HeadObjectCommand({ 278 - Bucket: config.bucket, 279 - Key: key, 280 - }), 281 - ); 282 269 } 283 270 284 271 export async function getPrivateObject(key: string): Promise<AssetObject> {
+4 -12
apps/api/src/task/index.ts
··· 14 14 import { publishEvent } from "../events"; 15 15 import { taskSchema } from "../schemas"; 16 16 import { 17 - assertObjectExists, 18 17 assertTaskImageKeyMatchesContext, 19 18 createTaskImageUploadUrl, 20 19 isImageContentType, ··· 807 806 throw new HTTPException(404, { message: "Task not found" }); 808 807 } 809 808 809 + const normalizedKey = key.trim(); 810 810 if ( 811 - !assertTaskImageKeyMatchesContext(key, { 811 + !assertTaskImageKeyMatchesContext(normalizedKey, { 812 812 workspaceId: taskContext.workspaceId, 813 813 projectId: taskContext.projectId, 814 814 taskId: taskContext.taskId, ··· 820 820 }); 821 821 } 822 822 823 - try { 824 - await assertObjectExists(key); 825 - } catch { 826 - throw new HTTPException(404, { 827 - message: "Uploaded object could not be found in storage.", 828 - }); 829 - } 830 - 831 823 const [existingAsset] = await db 832 824 .select({ id: assetTable.id }) 833 825 .from(assetTable) 834 - .where(eq(assetTable.objectKey, key)) 826 + .where(eq(assetTable.objectKey, normalizedKey)) 835 827 .limit(1); 836 828 837 829 const [asset] = existingAsset ··· 858 850 workspaceId: taskContext.workspaceId, 859 851 projectId: taskContext.projectId, 860 852 taskId: taskContext.taskId, 861 - objectKey: key, 853 + objectKey: normalizedKey, 862 854 filename, 863 855 mimeType: contentType, 864 856 size,