fix paths

shared-server
bat 3 years ago
parent f549939138
commit 913fda748d

@ -53,13 +53,12 @@ export class Frontend {
} }
async loadFile(user, repo, commit, src, dest) { async loadFile(user, repo, commit, src, dest) {
const url = this.rawUrl(user, repo, commit, dest) const url = this.rawUrl(user, repo, commit, src)
const resp = await fetch(url) const resp = await fetch(url)
this.checkOk(resp) this.checkOk(resp)
const body = await resp.arrayBuffer() const body = await resp.arrayBuffer()
const ext = dest.at('-1')?.match?.(/\.(\w+)$/)?.[1] const ext = dest.at('-1')?.match?.(/\.(\w+)$/)?.[1]
const contentType = this.contentTypes[ext] const contentType = this.contentTypes[ext]
console.log({ext, contentType})
this.files[this.pathString(dest)] = { this.files[this.pathString(dest)] = {
user, user,
repo, repo,

@ -56,7 +56,6 @@ export class Server {
'settings', 'settings',
'dialog', 'dialog',
'storage', 'storage',
'pages',
'editor-lib-codemirror', 'editor-lib-codemirror',
] ]
for (const repo of repos) { for (const repo of repos) {

Loading…
Cancel
Save