client: fix authentication error in RSS widgets
All checks were successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful

closes #341

Changelog: Fixed
This commit is contained in:
Johann150 2023-02-15 20:42:40 +01:00
parent bf445964b5
commit acaca35ff7
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 8 additions and 11 deletions

View file

@ -25,6 +25,7 @@ import MarqueeText from '@/components/marquee.vue';
import { GetFormResultType } from '@/scripts/form';
import MkContainer from '@/components/ui/container.vue';
import { useInterval } from '@/scripts/use-interval';
import * as os from '@/os';
const name = 'rssTicker';
@ -77,12 +78,10 @@ const fetching = ref(true);
let key = $ref(0);
const tick = (): void => {
fetch(`/api/fetch-rss?url=${widgetProps.url}`, {}).then(res => {
res.json().then(feed => {
items.value = feed.items;
fetching.value = false;
key++;
});
os.apiGet('fetch-rss', { url: widgetProps.url }).then(feed => {
items.value = feed.items;
fetching.value = false;
key++;
});
};

View file

@ -51,11 +51,9 @@ const items = ref([]);
const fetching = ref(true);
const tick = () => {
fetch(`/api/fetch-rss?url=${widgetProps.url}`, {}).then(res => {
res.json().then(feed => {
items.value = feed.items;
fetching.value = false;
});
os.apiGet('fetch-rss', { url: widgetProps.url }).then(feed => {
items.value = feed.items;
fetching.value = false;
});
};