1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

optional comment view authentifiction

This commit is contained in:
Fedor Katurov 2019-10-13 16:45:42 +07:00
parent fada25ee10
commit d1e369f723
2 changed files with 4 additions and 2 deletions

View file

@ -51,11 +51,13 @@ export const postNodeComment = ({
export const getNodeComments = ({
id,
access,
}: {
id: number;
access: string;
}): Promise<IResultWithStatus<{ comment: Comment }>> =>
api
.get(API.NODE.COMMENT(id))
.get(API.NODE.COMMENT(id), configWithToken(access))
.then(resultMiddleware)
.catch(errorMiddleware);

View file

@ -72,7 +72,7 @@ function* onNodeLoad({ id, node_type }: ReturnType<typeof nodeLoadNode>) {
// todo: load comments
const {
data: { comments },
} = yield call(getNodeComments, { id });
} = yield call(reqWrapper, getNodeComments, { id });
yield put(nodeSetComments(comments || []));