fix: use correct protocol module for webhook request
Build and Push Docker Image / build-and-push (push) Canceled after 0s
Build and Push Docker Image / build-and-push (push) Canceled after 0s
This commit is contained in:
1 parent
f2e48222c8
commit
79ca86874d
1 file changed
+4
-1
+4
-1
@@ -93,8 +93,11 @@ async function syncToTokenWatch(quotaData) {
|
||||
const postData = JSON.stringify(quotaData);
|
||||
// Ersetze diese URL durch die echte von TokenWatch auf der Jannik-Cloud, sobald sie läuft.
|
||||
const url = 'https://tokenwatch.orfel.de/api/webhook/antigravity';
|
||||
const isHttps = url.startsWith('https');
|
||||
const client = isHttps ? https : http;
|
||||
|
||||
return new Promise((resolve) => {
|
||||
const req = http.request(url, {
|
||||
const req = client.request(url, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(postData) }
|
||||
}, (res) => {
|
||||
|
||||
Reference in new issue
Block a user