mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
debug logging
This commit is contained in:
1 parent
41940839fd
commit
1ca32b0964
3 files changed
+7
-5
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user