Skip to content

Commit a4dc257

Browse files
committed
Add func.run for testing locally
1 parent 6c4347a commit a4dc257

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

functions/host-details/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ def on_post(request: FoundryRequest) -> FoundryResponse:
3535
body={"host_details": response["body"]["resources"][0]},
3636
code=200,
3737
)
38+
39+
if __name__ == '__main__':
40+
func.run()

functions/servicenow/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,6 @@ def on_post(request: FoundryRequest) -> FoundryResponse:
116116
code=500,
117117
errors=[FoundryAPIError(code=500, message=f"Error creating incident: {str(e)}")]
118118
)
119+
120+
if __name__ == '__main__':
121+
func.run()

0 commit comments

Comments
 (0)