- Readme changes
- docker fixed version postresql - sync [WIP]
This commit is contained in:
@@ -3,10 +3,11 @@ import { ref, onMounted } from 'vue';
|
||||
import axios from 'axios';
|
||||
|
||||
const feeds = ref([]);
|
||||
const buttonText = 'Sync'
|
||||
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const response = await axios.get('feeds', {
|
||||
const response = await axios.get('feeds/get', {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'user-token': localStorage.getItem("user-token")
|
||||
@@ -18,6 +19,23 @@ const fetchData = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
async function sync() {
|
||||
try {
|
||||
const repsponse = await axios.post('feeds/sync', {
|
||||
user_id: localStorage.getItem("user-id")
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'user-token': localStorage.getItem("user-token")
|
||||
}
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error sync', error)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
@@ -26,7 +44,7 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<h1>Feeds</h1>
|
||||
<h1>Feeds</h1> <button @click="sync">{{ buttonText }}</button>
|
||||
<div id='aricle'>
|
||||
<template v-for="feed in feeds">
|
||||
<h2>{{ feed.title }}</h2>
|
||||
|
||||
Reference in New Issue
Block a user