update frontend DNS to use dns.web

This commit is contained in:
Face
2025-09-05 16:22:56 +03:00
parent 09e2af17c4
commit f2fc528f7c
6 changed files with 177 additions and 13 deletions

View File

@@ -75,7 +75,7 @@ end
local function loadTLDs()
print('Loading available TLDs...')
local response = fetch('gurt://localhost:8877/tlds')
local response = fetch('gurt://dns.web/tlds')
if response:ok() then
tlds = response:json()
@@ -91,7 +91,7 @@ local function checkAuth()
if authToken then
print('Found auth token, checking validity...')
local response = fetch('gurt://localhost:8877/auth/me', {
local response = fetch('gurt://dns.web/auth/me', {
headers = {
Authorization = 'Bearer ' .. authToken
}
@@ -127,7 +127,7 @@ local function submitDomain(name, tld)
hideError('domain-error')
print('Submitting domain: ' .. name .. '.' .. tld)
local response = fetch('gurt://localhost:8877/domain', {
local response = fetch('gurt://dns.web/domain', {
method = 'POST',
headers = {
['Content-Type'] = 'application/json',
@@ -157,7 +157,7 @@ end
local function createInvite()
print('Creating invite code...')
local response = fetch('gurt://localhost:8877/auth/invite', {
local response = fetch('gurt://dns.web/auth/invite', {
method = 'POST',
headers = {
Authorization = 'Bearer ' .. authToken
@@ -184,7 +184,7 @@ local function redeemInvite(code)
hideError('redeem-error')
print('Redeeming invite code: ' .. code)
local response = fetch('gurt://localhost:8877/auth/redeem-invite', {
local response = fetch('gurt://dns.web/auth/redeem-invite', {
method = 'POST',
headers = {
['Content-Type'] = 'application/json',