-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: data api #57
base: main
Are you sure you want to change the base?
feat: data api #57
Conversation
🚀 Preview deployed to:
|
d5a4a3f
to
36f2cd4
Compare
11bbde7
to
773a580
Compare
bff8d15
to
43047c6
Compare
df7a889
to
594ccc2
Compare
594ccc2
to
95dc07a
Compare
95dc07a
to
6d10a02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
const send = async () => { | ||
const response = await fetch(`${this.influxApiUrl}/write`, { | ||
method: 'POST', | ||
body: metrics, | ||
headers: { | ||
Authorization: `Token ${this.influxApiToken}`, | ||
}, | ||
}); | ||
await response.body?.cancel(); | ||
if (response.status !== 204) { | ||
throw new Error(`InfluxDB write failed with status ${response.status}`); | ||
} | ||
}; | ||
|
||
return send(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we need to define this method and then call it right away. We can just remove the method wrapper in that case.
@@ -8,6 +8,5 @@ locals { | |||
domain_prefix = "${local.domain_stage}${local.domain_env}" | |||
domain = "data.${local.domain_prefix}immich.app" | |||
|
|||
monitoring_url = var.env == "prod" ? "https://cf-workers.monitoring.immich.cloud" : "https://cf-workers.monitoring.dev.immich.cloud" | |||
monitoring_token = var.vmetrics_api_token | |||
vmetrics_data_api_url = var.env == "prod" ? "https://data.immich.cloud" : "https://data.immich.cloud" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this should be something else for dev
No description provided.