1234567891011121314151617181920212223242526272829 |
- import { gql } from "../helpers";
- import { actionPromise } from "../reducers";
- export const actionAboutMe = () => async (dispatch, getState) => {
- const {
- auth: {
- payload: {
- sub: { _id },
- },
- },
- } = getState();
- await dispatch(
- actionPromise(
- "aboutMe",
- gql(
- `query AboutMe($q:String){
- UserFindOne(query:$q){
- _id username name nick avatar{
- _id url
- }
- }
- }`,
- {
- q: JSON.stringify([{ _id }]),
- }
- )
- )
- );
- };
|