debug logging

This commit is contained in:
Brandon Thomas committed 2025-09-25 03:53:09 -04:00
1 parent 41940839fd
commit 1ca32b0964
3 files changed
+7 -5

No files matched your search

+2 -4
View File
@@ -98,15 +98,15 @@ export class UsersApi extends ApiManager {
usernameOrEmail: string;
password: string;
}): Promise<ApiResponse<{ signedSession?: string }>> {
console.log("Logging in with usernameOrEmail:", usernameOrEmail);
console.log("libs/api - Logging in with usernameOrEmail:", usernameOrEmail);
const endpoint = `${this.getApiSchemeAndHost()}/v1/login`;
console.log("libs/api - Login endpoint", endpoint);
const body = {
username_or_email: usernameOrEmail,
password: password,
};
try {
console.log("calling auth fetch")
const response = await this.authFetch<
{ username_or_email: string; password: string },
{
@@ -119,8 +119,6 @@ export class UsersApi extends ApiManager {
method: "POST",
body: body,
});
console.log(response)
console.log("Auth fetch response!!! above")
return {
success: response.success,
data: response.success
@@ -30,14 +30,18 @@ export class StorytellerApiHostStore {
* This is used to sync with Tauri for enabling easier development.
*/
public setApiSchemeAndHost(apiSchemeAndHost: string) {
console.warn("StorytellerApiHostStore.setApiSchemeAndHost()", apiSchemeAndHost);
// TODO(bt,2025-07-06): Actually parse URL.
if (!apiSchemeAndHost.startsWith("http://") && !apiSchemeAndHost.startsWith("https://")) {
throw new Error(`Scheme not included in URL: ${apiSchemeAndHost}`);
}
const FINAL_VALID_SLASH = "https://".lastIndexOf("/");
if (apiSchemeAndHost.lastIndexOf("/") > FINAL_VALID_SLASH) {
throw new Error(`Path components should not be included in URL: ${apiSchemeAndHost}`);
}
this.apiSchemeAndHost = apiSchemeAndHost;
}
@@ -64,7 +64,7 @@ export const PromptBoxImage = ({
}: PromptBoxImageProps) => {
useSignals();
console.log("Selected model:", selectedModel);
console.debug("Selected model:", selectedModel);
useEffect(() => {
if (imageMediaId && url) {