Skip to content

Commit

Permalink
Merge pull request willswire#2 from Lucent/patch-1
Browse files Browse the repository at this point in the history
Works with service type "dyndns"
  • Loading branch information
willswire authored Mar 23, 2022
2 parents 04a3019 + 7d1f631 commit ccd33fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function handleRequest(request) {
},
});

case "/update": {
case "/nic/update": {
if (request.headers.has("Authorization")) {
const { username, password } = basicAuthentication(request);

Expand Down Expand Up @@ -58,7 +58,7 @@ async function handleRequest(request) {
async function informAPI(url, name, token) {
// Parse Url
const hostname = url.searchParams.get("hostname");
const ip = url.searchParams.get("ip");
const ip = url.searchParams.get("myip");

// Initialize API Handler
const cloudflare = new Cloudflare({
Expand Down Expand Up @@ -93,7 +93,7 @@ function verifyParameters(url) {
throw new BadRequestException("You must specify a hostname");
}

if (!url.searchParams.get("ip")) {
if (!url.searchParams.get("myip")) {
throw new BadRequestException("You must specify an ip address");
}
}
Expand Down

0 comments on commit ccd33fe

Please sign in to comment.