Skip to content

Commit

Permalink
fix: authenticatedFetch appending URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
tschoffelen committed Oct 6, 2024
1 parent eb47411 commit 91ca910
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
14 changes: 12 additions & 2 deletions packages/dashboard/src/components/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,21 @@ export const Login = ({}) => {
<CardContent className="grid gap-4">
<div className="grid gap-2">
<Label htmlFor="username">Username</Label>
<Input id="username" type="text" required />
<Input
id="username"
type="text"
autoComplete="username"
required
/>
</div>
<div className="grid gap-2">
<Label htmlFor="password">Password</Label>
<Input id="password" type="password" required />
<Input
id="password"
type="password"
autoComplete="password"
required
/>
</div>
</CardContent>
<CardFooter>
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const authenticatedFetch = async (
throw new Error("Unauthorized");
}

if (url.startsWith("/")) {
if (!url.includes("/api") && url.startsWith("/")) {
url = `${BASE_URL}/api` + url;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/deploy-script/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const domain = answers.CUSTOM_DOMAIN || endpoint;
console.log(
"\n\n" +
boxen(
`${chalk.green("Done!")} You can now access your TraceStack instance at \n${chalk.underline(chalk.bold(`https://${domain}`))}${adminPassword ? `\n\Username: admin\nPassword: ${adminPassword}` : ""}`,
`${chalk.green("Done!")} You can now access your TraceStack instance at \n${chalk.underline(chalk.bold(`https://${domain}`))}${adminPassword ? `\n\nUsername: admin\nPassword: ${adminPassword}` : ""}`,
{ padding: 1, borderStyle: "round" },
),
);
2 changes: 1 addition & 1 deletion packages/e2e-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"private": true,
"scripts": {
"test:e2e": "yarn node --experimental-vm-modules $(yarn bin jest) --coverage"
"test:e2e": "yarn node --experimental-vm-modules $(yarn bin jest)"
},
"devDependencies": {
"@aws-sdk/client-dynamodb": "^3.658.1",
Expand Down
1 change: 0 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"inputs": ["$TURBO_DEFAULT$", ".env*"]
},
"test:e2e": {
"dependsOn": ["build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"]
},
"dev": {
Expand Down

0 comments on commit 91ca910

Please sign in to comment.