Skip to content

Commit d4826b7

Browse files
committed
Add debug write fs
1 parent 51bded1 commit d4826b7

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

.github/workflows/on-api-release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ jobs:
6363
${{env.AWSL_SRC_ZIP}}
6464
${{env.AWSL_LAYER_ZIP}}
6565
66-
- name: dispatch "infrastructure-lambda-api"
67-
uses: peter-evans/repository-dispatch@v1
68-
with:
69-
token: ${{ env.GITHUB_PUSH_TOKEN }}
70-
repository: interscript/infrastructure-lambda-api
71-
event-type: ${{ github.repository }}
72-
client-payload: >-
73-
{
74-
"workflow": "on-api-release.yml",
75-
"api_tag_name": "${{env.RELEASE_TAG_NAME}}"
76-
}
66+
# - name: dispatch "infrastructure-lambda-api"
67+
# uses: peter-evans/repository-dispatch@v1
68+
# with:
69+
# token: ${{ env.GITHUB_PUSH_TOKEN }}
70+
# repository: interscript/infrastructure-lambda-api
71+
# event-type: ${{ github.repository }}
72+
# client-payload: >-
73+
# {
74+
# "workflow": "on-api-release.yml",
75+
# "api_tag_name": "${{env.RELEASE_TAG_NAME}}"
76+
# }

lib/interscript-api/lambda_function.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44

55
def handler(event:, context: {})
66
puts 123
7-
puts event
7+
puts ENV["RABADA_DATA"]
8+
puts File.directory?(ENV["RABADA_DATA"])
9+
File.open("#{ENV["RABADA_DATA"]}/log.txt", "w") { |f| f.write "#{Time.now} - User logged in\n" }
10+
file = File.open("#{ENV["RABADA_DATA"]}/log.txt")
11+
file_data = file.read
12+
puts file_data
13+
file.close
14+
puts ENV
815

916
cors_origin = ENV["DEFAULT_ORIGIN"]
1017
input_origin = event.fetch('headers', {}).fetch('origin', "")

0 commit comments

Comments
 (0)