-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix base URL usage in frontend #85
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -18,6 +18,7 @@ | ||||||||||||||||
import { MatFormFieldModule } from '@angular/material/form-field'; | |||||||||||||||||
import { MatInputModule } from '@angular/material/input'; | |||||||||||||||||
import { InstallationsService } from '../services/api/installations.service'; | |||||||||||||||||
import { BASE_URL } from '../services/server.service'; | |||||||||||||||||
Check failure Code scanning / ESLint Disallow unused variables Error
'BASE_URL' is defined but never used.
Copilot Autofix AI about 1 month ago The best way to fix the problem is to remove the unused import of
Suggested changeset
1
frontend/src/app/main/main.component.ts
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||
|
|||||||||||||||||
@Component({ | |||||||||||||||||
selector: 'app-main', | |||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { isDevMode } from '@angular/core'; | ||
|
||
export const BASE_URL = 'http://localhost:32000'; | ||
|
||
export const serverUrl = (() => { | ||
if (isDevMode()) { | ||
return 'http://localhost'; | ||
return BASE_URL; | ||
} else { | ||
return ''; | ||
} | ||
})(); | ||
|
Check failure
Code scanning / ESLint
Disallow unused variables Error
Copilot Autofix AI about 1 month ago
To fix the problem, we need to remove the unused
BASE_URL
import from the filefrontend/src/app/install/install.component.ts
. This will resolve the ESLint error and clean up the code by removing unnecessary imports.BASE_URL
on line 9.BASE_URL
import from the import statement.