Skip to content

Commit

Permalink
feat: return user social media in post props end-point
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcarvalhoj committed Mar 12, 2024
1 parent fc3e7fd commit f50ec9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/controllers/post.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ export const getAuthorProps = async (authorId: string) => {
try {
const data = await client.get(params).promise();
if (data.Item) {
const { name, image } = data.Item;
return { name, image };
const { name, image, socialMedia } = data.Item;
return { name, image, socialMedia };
}
} catch (error) {
console.error("Error getting author props:", error);
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const createResume = async (id: string, resume: Resume) => {
id: id,
},
UpdateExpression:
"SET socialMedia = :socialMedia, articles = :articles, diploma = :diploma, skills = :skills, microResume = :microResume projectRole = :projectRole",
"SET socialMedia = :socialMedia, articles = :articles, diploma = :diploma, skills = :skills, microResume = :microResume, projectRole = :projectRole",
ExpressionAttributeValues: {
":socialMedia": resume.socialMedia,
":articles": resume.articles,
Expand Down

0 comments on commit f50ec9d

Please sign in to comment.