Skip to content

Commit e6a5fc6

Browse files
committed
Fix missing creation attributes
1 parent 5d5999b commit e6a5fc6

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

packages/twenty-server/src/engine/metadata-modules/serverless-function/dtos/create-serverless-function.input.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,14 @@ export class CreateServerlessFunctionInput {
4545
@IsObject()
4646
@IsOptional()
4747
code?: Sources;
48+
49+
@IsString()
50+
@Field({ nullable: true })
51+
@IsOptional()
52+
handlerName?: string;
53+
54+
@IsString()
55+
@Field({ nullable: true })
56+
@IsOptional()
57+
handlerPath?: string;
4858
}

packages/twenty-server/src/engine/metadata-modules/serverless-function/utils/from-create-serverless-function-input-to-flat-serverless-function.util.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ export const fromCreateServerlessFunctionInputToFlatServerlessFunction = ({
3030
id,
3131
name: rawCreateServerlessFunctionInput.name,
3232
description: rawCreateServerlessFunctionInput.description ?? null,
33-
handlerPath: DEFAULT_HANDLER_PATH,
34-
handlerName: DEFAULT_HANDLER_NAME,
33+
handlerPath:
34+
rawCreateServerlessFunctionInput.handlerPath ?? DEFAULT_HANDLER_PATH,
35+
handlerName:
36+
rawCreateServerlessFunctionInput.handlerName ?? DEFAULT_HANDLER_NAME,
3537
universalIdentifier:
3638
rawCreateServerlessFunctionInput.universalIdentifier ?? v4(),
3739
createdAt: currentDate,

0 commit comments

Comments
 (0)