[U] Update hosts

This commit is contained in:
Hykilpikonna
2021-12-25 17:04:30 -05:00
parent fbaf5a04ca
commit bbb3f5f622
3 changed files with 9 additions and 6 deletions
+4 -1
View File
@@ -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'
}
+3 -3
View File
@@ -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 `<span class="emoji">${emoji}</span>`
}))))
// Fetch publications from zotero
fetch(`${backendUrl}/zotero.json`)
fetch(`${hosts.api}/zotero.json`)
.then(it => it.json()).then(it =>
{
// Filter out publications and attachments
+2 -2
View File
@@ -6,7 +6,7 @@
<script lang="ts">
import {Options, Vue} from 'vue-class-component';
import {backendUrl} from "@/scripts/constants";
import {hosts} from "@/scripts/constants";
import moment from "moment";
import PostView from "@/components/Post.vue";
@@ -55,7 +55,7 @@ export default class Blog extends Vue
created(): void
{
fetch(`${backendUrl}/posts.json`).then(it => it.json()).then(it => {
fetch(`${hosts.api}/posts.json`).then(it => it.json()).then(it => {
this.posts = it
this.posts.forEach(it => it.date = moment(it.date).format('YYYY-MM-DD h:mm'))
this.posts.reverse()