import services from '../services' ; import { Article } from '../types/article.interface' ; import { Tag } from '../types/tag.interface' ; export type TagState = Tag | null ; export const tag = { state : null as TagState , reducers : { } , effects : { async addTag ( state , payload ) { return services . tag . user . createTag ( payload ) ; } , async updateTag ( state , payload ) { return services . tag . user . updateTag ( payload ) ; } , async updateArticle ( state , payload ) { return services . article . user . updateArticle ( payload ) ; } , async deleteArticle ( state , payload ) { return services . article . user . deleteArticle ( payload ) ; } } , } ;