Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix(api): 🐛 merge construct props and function props correctly (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
ap0nia authored Dec 22, 2023
1 parent ffe387c commit c5c0649
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/api/src/routes/v1/rest/websoc/+config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import { constructs, esbuildOptions } from "../../../../../bronya.config";

export const overrides: ApiPropsOverride = {
constructs: {
...constructs,
functionProps: (scope, id) => ({
...constructs.functionProps?.(scope, id),
role: new Role(scope, `${id}-v1-rest-websoc-role`, {
assumedBy: new ServicePrincipal("lambda.amazonaws.com"),
managedPolicies: [
Expand All @@ -33,7 +35,6 @@ export const overrides: ApiPropsOverride = {
},
}),
}),
...constructs,
},
esbuild: {
...esbuildOptions,
Expand Down
3 changes: 2 additions & 1 deletion apps/api/src/routes/v1/rest/websoc/{id}/+config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import { constructs, esbuildOptions } from "../../../../../../bronya.config";

export const overrides: ApiPropsOverride = {
constructs: {
...constructs,
functionProps: (scope, id) => ({
...constructs.functionProps?.(scope, id),
role: new Role(scope, `${id}-v1-rest-websoc-id-role`, {
assumedBy: new ServicePrincipal("lambda.amazonaws.com"),
managedPolicies: [
Expand All @@ -33,7 +35,6 @@ export const overrides: ApiPropsOverride = {
},
}),
}),
...constructs,
},
esbuild: {
...esbuildOptions,
Expand Down

0 comments on commit c5c0649

Please sign in to comment.