From bbb3f5f622aae14adca880f80b8789aa5495ee67 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 25 Dec 2021 17:04:30 -0500 Subject: [PATCH] [U] Update hosts --- src/scripts/constants.ts | 5 ++++- src/views/About.vue | 6 +++--- src/views/Life.vue | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/scripts/constants.ts b/src/scripts/constants.ts index 66ce6fa..1f835a1 100644 --- a/src/scripts/constants.ts +++ b/src/scripts/constants.ts @@ -1,2 +1,5 @@ // export const backendUrl = 'http://localhost:5000' -export const backendUrl = 'https://telegram-api.hydev.org' +export const hosts = { + api: 'https://profile-api.hydev.org', + content: 'https://profile-content.hydev.org' +} diff --git a/src/views/About.vue b/src/views/About.vue index 373b578..d6fac4f 100644 --- a/src/views/About.vue +++ b/src/views/About.vue @@ -16,7 +16,7 @@ import {parseExtensions} from '@/scripts/extended_markdown' import $ from 'jquery' import 'jqueryui' import ZoteroPublication, {ZoteroAttachment, ZoteroItem} from "@/components/ZoteroPublication.vue"; -import {backendUrl} from "@/scripts/constants"; +import {hosts} from "@/scripts/constants"; @Options({components: {ZoteroPublication}}) export default class About extends Vue @@ -27,13 +27,13 @@ export default class About extends Vue mounted(): void { // Fetch readme - fetch(`${backendUrl}/profile-readme.md`).then(it => it.text()) + fetch(`${hosts.content}/profile-readme.md`).then(it => it.text()) .then(it => this.html = marked(parseExtensions(it.replace(emojiRegex(), (emoji) => { return `${emoji}` })))) // Fetch publications from zotero - fetch(`${backendUrl}/zotero.json`) + fetch(`${hosts.api}/zotero.json`) .then(it => it.json()).then(it => { // Filter out publications and attachments diff --git a/src/views/Life.vue b/src/views/Life.vue index 98be1c9..ec4f562 100644 --- a/src/views/Life.vue +++ b/src/views/Life.vue @@ -6,7 +6,7 @@