-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Code]: use absolute path for api path #34582
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
Changes from all commits
3fe11dc
5cc072a
745d359
d54d956
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 |
|---|---|---|
|
|
@@ -5,6 +5,8 @@ | |
| */ | ||
|
|
||
| import { editor, IDisposable, Uri } from 'monaco-editor'; | ||
| import chrome from 'ui/chrome'; | ||
|
|
||
| import { ImmortalReference } from './immortal_reference'; | ||
|
|
||
| export interface IReference<T> extends IDisposable { | ||
|
|
@@ -52,7 +54,9 @@ export class TextModelResolverService implements ITextModelService { | |
| const repo = `${resource.authority}${resource.path}`; | ||
| const revision = resource.query; | ||
| const file = resource.fragment; | ||
| const response = await fetch(`../api/code/repo/${repo}/blob/${revision}/${file}`); | ||
| const response = await fetch( | ||
| chrome.addBasePath(`/api/code/repo/${repo}/blob/${revision}/${file}`) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just to confirm. it's required to add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. kfetch return the body of the request using body.asJson the problem is that our request doesn't return json, so response will be null unfornately. |
||
| ); | ||
| if (response.status === 200) { | ||
| const contentType = response.headers.get('Content-Type'); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this should fix an existing bug. or the
/api/lsproute is also a valid endpoint?