diff options
author | Devlin Junker <devlin.junker@gmail.com> | 2023-08-08 08:28:08 -0700 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2023-08-11 09:22:24 +0200 |
commit | 2287835894a4552c8247c6be85934ff9eb00ed07 (patch) | |
tree | 89b06035dde2a1dd57165658915b9e05243d0d03 /src/store | |
parent | da782c0b07070f63b17135a6dfce61eb95f4c7e7 (diff) |
use eslint --fix to clean up linting errors
Signed-off-by: Devlin Junker <devlin.junker@gmail.com>
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/feed.ts | 17 | ||||
-rw-r--r-- | src/store/folder.ts | 6 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/store/feed.ts b/src/store/feed.ts index 6332fb988..737b90c5a 100644 --- a/src/store/feed.ts +++ b/src/store/feed.ts @@ -35,9 +35,8 @@ export const actions = { commit(FEED_MUTATION_TYPES.SET_FEEDS, feeds.data.feeds) }, async [FEED_ACTION_TYPES.ADD_FEED]( - { commit }: ActionParams, - { feedReq }: { feedReq: { url: string; folder?: { id: number }, user?: string; password?: string; } }) - { + { commit }: ActionParams, + { feedReq }: { feedReq: { url: string; folder?: { id: number }, user?: string; password?: string; } }) { let url = feedReq.url.trim() if (!url.startsWith('http')) { url = 'https://' + url @@ -69,10 +68,10 @@ export const actions = { }) commit(FEED_MUTATION_TYPES.ADD_FEED, response.data.feeds[0]) - } catch(e) { - // TODO: show error to user if failure - console.log(e); - return; + } catch (e) { + // TODO: show error to user if failure + console.log(e) + } }, } @@ -84,8 +83,8 @@ export const mutations = { }) }, [FEED_MUTATION_TYPES.ADD_FEED](state: AppState, feed: Feed) { - state.feeds.push(feed); - } + state.feeds.push(feed) + }, } export default { diff --git a/src/store/folder.ts b/src/store/folder.ts index 140d8b602..e6ef70341 100644 --- a/src/store/folder.ts +++ b/src/store/folder.ts @@ -1,9 +1,9 @@ -import { Feed } from '@/types/Feed' import axios from '@nextcloud/axios' import { generateUrl } from '@nextcloud/router' import { AppState, ActionParams } from '../store' import { Folder } from '../types/Folder' +import { Feed } from '../types/Feed' import { FEED_MUTATION_TYPES } from './feed' export const FOLDER_ACTION_TYPES = { @@ -72,7 +72,7 @@ export const mutations = { folder.feeds.push(it) folder.feedCount += it.unreadCount } - }); + }) }, [FEED_MUTATION_TYPES.ADD_FEED](state: AppState, feed: Feed) { const folder = state.folders.find(folder => folder.id === feed.folderId) @@ -80,7 +80,7 @@ export const mutations = { folder.feeds.push(feed) folder.feedCount += feed.unreadCount } - } + }, } export default { |