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
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:
parent
bf445964b5
commit
acaca35ff7
2 changed files with 8 additions and 11 deletions
|
@ -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,13 +78,11 @@ const fetching = ref(true);
|
|||
let key = $ref(0);
|
||||
|
||||
const tick = (): void => {
|
||||
fetch(`/api/fetch-rss?url=${widgetProps.url}`, {}).then(res => {
|
||||
res.json().then(feed => {
|
||||
os.apiGet('fetch-rss', { url: widgetProps.url }).then(feed => {
|
||||
items.value = feed.items;
|
||||
fetching.value = false;
|
||||
key++;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
watch(() => widgetProps.url, tick);
|
||||
|
|
|
@ -51,12 +51,10 @@ const items = ref([]);
|
|||
const fetching = ref(true);
|
||||
|
||||
const tick = () => {
|
||||
fetch(`/api/fetch-rss?url=${widgetProps.url}`, {}).then(res => {
|
||||
res.json().then(feed => {
|
||||
os.apiGet('fetch-rss', { url: widgetProps.url }).then(feed => {
|
||||
items.value = feed.items;
|
||||
fetching.value = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
watch(() => widgetProps.url, tick);
|
||||
|
|
Loading…
Reference in a new issue