Skip to content

Commit

Permalink
experienceintrotext for author page
Browse files Browse the repository at this point in the history
  • Loading branch information
mauryakrishna committed Apr 4, 2021
1 parent 90cd694 commit 199182f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resolvers/authors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import getAlphanumeric from '../utils/getalphanumeric';
import SendEmailVerificationLink from '../mails/sendemailverificationlink';
import { EXPERIENCES_PER_PAGE, VERIFICATION_LINK_EXPIRY_TIME, REFRESH_TOKEN_EXPIRY } from '../config/constants';
import { cursorFormat, createdAtFormat, publishDateFormat, addMinutesInCurrentTime } from '../utils/dateformats';

import serialize from "../utils/getexperienceintrotext";
export const verifyMe = (_, __, context) => {
const { displayname, authoruid } = context;
const valid = !!(displayname && authoruid);
Expand Down Expand Up @@ -83,6 +83,7 @@ export const getAuthor = async (_, { cursor, experienceperpage, uid, itsme }, co

const author = result[0];
author.experiences = experiencesResult.map((exp) => {
exp.experienceintrotext = serialize(exp.experience);
exp.created_at = createdAtFormat(exp.created_at);

if (exp.publishdate) {
Expand Down
1 change: 1 addition & 0 deletions src/types/authors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const Authors = gql`
displayname: String!
email: String!
shortintro: String
experienceintrotext: String
region: String
languages: String
experiences: [Experience]
Expand Down

0 comments on commit 199182f

Please sign in to comment.