This commit is contained in:
Alan Rynne 2021-11-04 11:53:01 +01:00
Родитель 0b4217465f
Коммит e9fe4387cb
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -77,7 +77,8 @@ export default {
},
async doesDiffExist(){
if(!this.currentCommit || !this.prevCommit) return { commit: null }
var diffUrl = `http://localhost:8000/diff_check/${this.$route.params.id}/${this.currentCommit.id}/${this.prevCommit.id}`
var backendUrl = process.env.VUE_APP_BACKEND_URL
var diffUrl = `${backendUrl}/diff_check/${this.$route.params.id}/${this.currentCommit.id}/${this.prevCommit.id}`
var res = await fetch(diffUrl, {
headers: {
method: "GET",
@ -90,8 +91,9 @@ export default {
},
async requestDiff() {
this.loading = true
var backendUrl = process.env.VUE_APP_BACKEND_URL
console.log("diff requested for", this.currentCommit.id, this.prevCommit.id)
var diffUrl = `http://localhost:8000/diff/${this.$route.params.id}/${this.currentCommit.id}/${this.prevCommit.id}`
var diffUrl = `${backendUrl}/diff/${this.$route.params.id}/${this.currentCommit.id}/${this.prevCommit.id}`
var res = await fetch(diffUrl, {
headers: {
method: "GET",

Просмотреть файл

@ -10,10 +10,10 @@ app = FastAPI()
server_url = os.environ.get("SPECKLE_SERVER", "https://speckle.xyz")
diff_branch = os.environ.get("DIFF_BRANCH", "diff")
frontend_url = os.environ.get("FRONTEND_URL", "http://localhost:8080")
origins = [
"http://localhost",
"http://localhost:8080",
frontend_url,
]
app.add_middleware(