W n8n attention
This commit is contained in:
parent
d1205215f8
commit
a15a87f70e
@ -83,7 +83,7 @@ export async function GET(request: Request, props: { params: Promise<{ missionId
|
||||
// Add public URLs to mission logo and attachments
|
||||
const missionWithUrls = {
|
||||
...mission,
|
||||
logoUrl: mission.logo ? `/api/missions/image/${mission.logo}` : null,
|
||||
logoUrl: mission.logo ? `/api/missions/image/${mission.logo.replace('missions/', '')}` : null,
|
||||
logo: mission.logo,
|
||||
attachments: mission.attachments.map((attachment: { id: string; filename: string; filePath: string; fileType: string; fileSize: number; createdAt: Date }) => ({
|
||||
...attachment,
|
||||
|
||||
@ -147,8 +147,8 @@ export async function POST(request: Request) {
|
||||
const { filePath } = await uploadMissionLogo(userId, missionId, file);
|
||||
console.log('Logo uploaded successfully to path:', filePath);
|
||||
|
||||
// Generate public URL
|
||||
const publicUrl = `/api/missions/image/${filePath}`;
|
||||
// Generate public URL - remove missions/ prefix since it's added by the API
|
||||
const publicUrl = `/api/missions/image/${filePath.replace('missions/', '')}`;
|
||||
console.log('Public URL for logo:', publicUrl);
|
||||
|
||||
// Update mission record with logo path
|
||||
|
||||
Loading…
Reference in New Issue
Block a user