From 243a2a19d72ef8f0f5d00877efc0381be6578e35 Mon Sep 17 00:00:00 2001 From: bat Date: Wed, 10 May 2023 06:57:52 +0000 Subject: [PATCH] add url for raw files w/ commit hash --- frontend.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/frontend.js b/frontend.js index 05bee7a..d75bb90 100644 --- a/frontend.js +++ b/frontend.js @@ -1,4 +1,17 @@ export class Frontend { + repoUrl(user, repo) { + + } + + rawUrl(user, repo, commit, path) { + return ( + this.appBaseUrl + + '/raw/commit' + + '/' + encodeURIComponent(commit) + + '/' + encodeURI(path) + ) + } + async serve(event) { // TODO: load files from different mounted repos event.respondWith(new Response(