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) {
const url = this.rawUrl(user, repo, commit, dest)
const url = this.rawUrl(user, repo, commit, src)
const resp = await fetch(url)
this.checkOk(resp)
const body = await resp.arrayBuffer()
const ext = dest.at('-1')?.match?.(/\.(\w+)$/)?.[1]
const contentType = this.contentTypes[ext]
console.log({ext, contentType})
this.files[this.pathString(dest)] = {
user,
repo,

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

Loading…
Cancel
Save