File tree Expand file tree Collapse file tree 3 files changed +6
-10
lines changed
routes/(console)/project-[region]-[project]/sites Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,8 @@ function createConsoleSdk(client: Client) {
81
81
billing : new Billing ( client ) ,
82
82
sources : new Sources ( client ) ,
83
83
sites : new Sites ( client ) ,
84
- domains : new Domains ( client )
84
+ domains : new Domains ( client ) ,
85
+ storage : new Storage ( client )
85
86
} ;
86
87
}
87
88
Original file line number Diff line number Diff line change 20
20
import { app } from ' $lib/stores/app' ;
21
21
import { base } from ' $app/paths' ;
22
22
import { isCloud } from ' $lib/system' ;
23
- import { getApiEndpoint } from ' $lib/stores/sdk' ;
23
+ import { sdk } from ' $lib/stores/sdk' ;
24
24
import { capitalize } from ' $lib/helpers/string' ;
25
- import { page } from ' $app/state' ;
26
25
27
26
export let deployment: Models .Deployment ;
28
27
export let proxyRuleList: Models .ProxyRuleList ;
46
45
}
47
46
48
47
function getFilePreview(fileId : string ) {
49
- // TODO: @Meldiron use sdk.forConsole.storage.getFilePreview
50
- const endpoint = getApiEndpoint (page .params .region );
51
- return endpoint + ` /storage/buckets/screenshots/files/${fileId }/view?project=console ` ;
48
+ return sdk .forConsole .storage .getFileView (' screenshots' , fileId );
52
49
}
53
50
</script >
54
51
Original file line number Diff line number Diff line change 7
7
import { generateSiteDeploymentDesc } from ' ./store' ;
8
8
import { SvgIcon } from ' $lib/components' ;
9
9
import { app } from ' $lib/stores/app' ;
10
- import { getApiEndpoint } from ' $lib/stores/sdk' ;
10
+ import { sdk } from ' $lib/stores/sdk' ;
11
11
import AddCollaboratorModal from ' ./(components)/addCollaboratorModal.svelte' ;
12
12
import SitesActionMenu from ' ./sitesActionMenu.svelte' ;
13
13
import { capitalize } from ' $lib/helpers/string' ;
33
33
}
34
34
35
35
function getFilePreview(fileId : string ) {
36
- // TODO: @Meldiron use sdk.forConsole.storage.getFilePreview
37
- const endpoint = getApiEndpoint (page .params .region );
38
- return endpoint + ` /storage/buckets/screenshots/files/${fileId }/view?project=console ` ;
36
+ return sdk .forConsole .storage .getFileView (' screenshots' , fileId );
39
37
}
40
38
</script >
41
39
You can’t perform that action at this time.
0 commit comments