[U] Update hosts
This commit is contained in:
@@ -1,2 +1,5 @@
|
|||||||
// export const backendUrl = 'http://localhost:5000'
|
// 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
@@ -16,7 +16,7 @@ import {parseExtensions} from '@/scripts/extended_markdown'
|
|||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import 'jqueryui'
|
import 'jqueryui'
|
||||||
import ZoteroPublication, {ZoteroAttachment, ZoteroItem} from "@/components/ZoteroPublication.vue";
|
import ZoteroPublication, {ZoteroAttachment, ZoteroItem} from "@/components/ZoteroPublication.vue";
|
||||||
import {backendUrl} from "@/scripts/constants";
|
import {hosts} from "@/scripts/constants";
|
||||||
|
|
||||||
@Options({components: {ZoteroPublication}})
|
@Options({components: {ZoteroPublication}})
|
||||||
export default class About extends Vue
|
export default class About extends Vue
|
||||||
@@ -27,13 +27,13 @@ export default class About extends Vue
|
|||||||
mounted(): void
|
mounted(): void
|
||||||
{
|
{
|
||||||
// Fetch readme
|
// 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) => {
|
.then(it => this.html = marked(parseExtensions(it.replace(emojiRegex(), (emoji) => {
|
||||||
return `<span class="emoji">${emoji}</span>`
|
return `<span class="emoji">${emoji}</span>`
|
||||||
}))))
|
}))))
|
||||||
|
|
||||||
// Fetch publications from zotero
|
// Fetch publications from zotero
|
||||||
fetch(`${backendUrl}/zotero.json`)
|
fetch(`${hosts.api}/zotero.json`)
|
||||||
.then(it => it.json()).then(it =>
|
.then(it => it.json()).then(it =>
|
||||||
{
|
{
|
||||||
// Filter out publications and attachments
|
// Filter out publications and attachments
|
||||||
|
|||||||
+2
-2
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {Options, Vue} from 'vue-class-component';
|
import {Options, Vue} from 'vue-class-component';
|
||||||
import {backendUrl} from "@/scripts/constants";
|
import {hosts} from "@/scripts/constants";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import PostView from "@/components/Post.vue";
|
import PostView from "@/components/Post.vue";
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ export default class Blog extends Vue
|
|||||||
|
|
||||||
created(): void
|
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 = it
|
||||||
this.posts.forEach(it => it.date = moment(it.date).format('YYYY-MM-DD h:mm'))
|
this.posts.forEach(it => it.date = moment(it.date).format('YYYY-MM-DD h:mm'))
|
||||||
this.posts.reverse()
|
this.posts.reverse()
|
||||||
|
|||||||
Reference in New Issue
Block a user