chore: standardize service domains and error logging
Build and Push Docker Images / detect-changes (push) Successful in 15s
Build and Push Docker Images / build-auth-api (push) Successful in 1m2s
Build and Push Docker Images / build-employee-api (push) Successful in 1m2s
Build and Push Docker Images / build-transit-api (push) Successful in 1m2s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m10s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m22s
Build and Push Docker Images / deploy-test-node (push) Successful in 4s

This commit is contained in:
Sven laptop
2026-09-18 19:26:05 +02:00
parent 3f0a02aa04
commit 1154d1d658
21 changed files with 609 additions and 380 deletions
+3 -3
View File
@@ -2,9 +2,9 @@
Native Win32 driver client targeting Windows XP-era systems.
The client authenticates with `auth_api` at `192.168.68.66:5000`, then requests
assigned weekly schedule templates from `transit_api` at
`192.168.68.66:5001/driver/schedules/daily`.
The client authenticates with `https://auth.xtransit.testinstance.nl`, then requests
assigned weekly schedule templates from
`https://transit.xtransit.testinstance.nl/driver/schedules/daily`.
Schedules are assigned through `transit.shifts`; the client does not expect a
`driver_id`, `bus_id`, or `weekdays` column on `transit.schedules`.
Binary file not shown.
+8 -6
View File
@@ -25,7 +25,7 @@
#define ID_ROUTES_LABEL 116
#define MAX_BUF 65535
#define API_HOST "192.168.68.66"
#define API_HOST "auth.xtransit.testinstance.nl"
#define AUTH_PORT 5000
#define TRANSIT_PORT 5001
@@ -538,6 +538,7 @@ static int HttpRequestText(const char *method,
const char *src;
const char *slash;
const char *colon;
int secure = 0;
int port = 80;
DWORD flags = 0;
DWORD status = 0;
@@ -554,6 +555,7 @@ static int HttpRequestText(const char *method,
src += 7;
} else if (strncmp(src, "https://", 8) == 0) {
src += 8;
secure = 1;
}
host[0] = '\0';
@@ -596,7 +598,7 @@ static int HttpRequestText(const char *method,
}
if (host[0] == '\0') {
snprintf(host, sizeof(host), "192.168.68.66");
snprintf(host, sizeof(host), "%s", API_HOST);
}
if (port == 0) {
@@ -633,7 +635,7 @@ static int HttpRequestText(const char *method,
NULL,
WINHTTP_NO_REFERER,
WINHTTP_DEFAULT_ACCEPT_TYPES,
0);
secure ? WINHTTP_FLAG_SECURE : 0);
if (!hRequest) {
HttpErrorMessage("Unable to open request", GetLastError());
goto cleanup;
@@ -747,7 +749,7 @@ static void PerformLogin(HWND hwnd, APPSTATE *state)
userCode, password);
SetStatusText(hwnd, "Logging in...");
if (!HttpRequestText("POST", "http://192.168.68.66:5000/login", payload, NULL, response, sizeof(response))) {
if (!HttpRequestText("POST", "https://auth.xtransit.testinstance.nl/login", payload, NULL, response, sizeof(response))) {
SetOutputText(hwnd, "Driver service unreachable. Please try again.");
SetStatusText(hwnd, "Login failed");
return;
@@ -784,7 +786,7 @@ static void PerformRefresh(HWND hwnd, APPSTATE *state)
if (date[0] == '\0') {
snprintf(date, sizeof(date), "2026-09-17");
}
snprintf(scheduleUrl, sizeof(scheduleUrl), "http://192.168.68.66:5001/driver/schedules/daily?date=%s", date);
snprintf(scheduleUrl, sizeof(scheduleUrl), "https://transit.xtransit.testinstance.nl/driver/schedules/daily?date=%s", date);
SetStatusText(hwnd, "Loading schedule...");
if (!HttpRequestText("GET", scheduleUrl, NULL, authHeader, response, sizeof(response))) {
@@ -825,7 +827,7 @@ static void PerformLoadStops(HWND hwnd, APPSTATE *state)
}
snprintf(authHeader, sizeof(authHeader), "Authorization: Bearer %s\r\n", state->token);
snprintf(stopsUrl, sizeof(stopsUrl), "http://192.168.68.66:5001/bus-lines/%d/stops", lineId);
snprintf(stopsUrl, sizeof(stopsUrl), "https://transit.xtransit.testinstance.nl/bus-lines/%d/stops", lineId);
SetStatusText(hwnd, "Loading stop details...");
if (!HttpRequestText("GET", stopsUrl, NULL, authHeader, response, sizeof(response))) {
Binary file not shown.