We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 07bb7f2 + ca0d283 commit 95dc62eCopy full SHA for 95dc62e
webui/src/api/search.ts
@@ -1,5 +1,6 @@
1
import type { Ref } from 'vue';
2
-import type { BangumiRule } from '#/bangumi';
+import { omit } from 'radash';
3
+import type { BangumiAPI, BangumiRule } from '#/bangumi';
4
5
type EventSourceStatus = 'OPEN' | 'CONNECTING' | 'CLOSED';
6
@@ -33,7 +34,12 @@ export const apiSearch = {
33
34
status.value = 'OPEN';
35
};
36
es.onmessage = (e) => {
- const newData = JSON.parse(e.data) as BangumiRule;
37
+ const _data = JSON.parse(e.data) as BangumiAPI;
38
+ const newData: BangumiRule = {
39
+ ...omit(_data, ['filter', 'rss_link']),
40
+ filter: _data.filter.split(','),
41
+ rss_link: _data.rss_link.split(','),
42
+ };
43
data.value = [...data.value, newData];
44
45
es.onerror = (err) => {
0 commit comments