mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-05 06:10:34 -06:00
fix: github action that reports stripe usage (#1599)
This commit is contained in:
committed by
GitHub
parent
a34606ab03
commit
7acd2ccabb
@@ -10,13 +10,13 @@ jobs:
|
||||
cron-reportUsageToStripe:
|
||||
env:
|
||||
APP_URL: ${{ secrets.APP_URL }}
|
||||
API_KEY: ${{ secrets.API_KEY }}
|
||||
CRON_SECRET: ${{ secrets.CRON_SECRET }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: cURL request
|
||||
if: ${{ env.APP_URL && env.API_KEY }}
|
||||
if: ${{ env.APP_URL && env.CRON_SECRET }}
|
||||
run: |
|
||||
curl ${{ env.APP_URL }}/api/cron/report-usage \
|
||||
-X GET \
|
||||
-H 'x-api-key: ${{ env.API_KEY }}' \
|
||||
-X POST \
|
||||
-H 'x-api-key: ${{ env.CRON_SECRET }}' \
|
||||
--fail
|
||||
|
||||
@@ -51,7 +51,7 @@ async function reportTeamUsage(team: TTeam) {
|
||||
}
|
||||
}
|
||||
|
||||
export async function GET(): Promise<NextResponse> {
|
||||
export async function POST(): Promise<NextResponse> {
|
||||
const headersList = headers();
|
||||
const apiKey = headersList.get("x-api-key");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user