mirror of
https://github.com/4ev-link/4ev.link.git
synced 2026-01-13 16:18:05 +00:00
Feat: Add geolocation data to signup notification
This commit is contained in:
@@ -41,10 +41,13 @@ export async function onRequestPost({ request, env }) {
|
||||
.bind(username,pass_hash)
|
||||
.run();
|
||||
|
||||
const { country, region, city } = request.cf || {};
|
||||
const loc = [city, region, country].filter(Boolean).join(", ") || "Unknown";
|
||||
|
||||
await ntfy(
|
||||
env,
|
||||
"auth-signup",
|
||||
`event=signup\nuser=${username}`,
|
||||
`event=signup\nuser=${username}\nloc=${loc}`,
|
||||
3
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user