diff --git a/client/coral-framework/actions/auth.js b/client/coral-framework/actions/auth.js
index a1a44611f..a566ee15c 100644
--- a/client/coral-framework/actions/auth.js
+++ b/client/coral-framework/actions/auth.js
@@ -3,6 +3,7 @@ import translations from './../translations';
const lang = new I18n(translations);
import * as actions from '../constants/auth';
import {base, handleResp, getInit} from '../helpers/response';
+import {addItem} from './items'
// Dialog Actions
export const showSignInDialog = () => ({type: actions.SHOW_SIGNIN_DIALOG});
@@ -29,6 +30,7 @@ export const fetchSignIn = (formData) => dispatch => {
.then(({user}) => {
dispatch(hideSignInDialog());
dispatch(signInSuccess(user));
+ dispatch(addItem(user, 'users'));
})
.catch(() => dispatch(signInFailure(lang.t('error.emailPasswordError'))));
};
@@ -54,8 +56,10 @@ export const facebookCallback = (err, data) => dispatch => {
return;
}
try {
- dispatch(signInFacebookSuccess(JSON.parse(data)));
+ const user = JSON.parse(data);
+ dispatch(signInFacebookSuccess(user));
dispatch(hideSignInDialog());
+ dispatch(addItem(user, 'users'));
} catch (err) {
dispatch(signInFacebookFailure(err));
return;
@@ -113,4 +117,3 @@ export const logout = () => dispatch => {
export const validForm = () => ({type: actions.VALID_FORM});
export const invalidForm = error => ({type: actions.INVALID_FORM, error});
-
diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js
index e18d83acc..76f7e43be 100644
--- a/client/coral-plugin-commentbox/CommentBox.js
+++ b/client/coral-plugin-commentbox/CommentBox.js
@@ -26,7 +26,7 @@ class CommentBox extends Component {
let comment = {
body: this.state.body,
asset_id: id,
- user_id: author.id
+ author_id: author.id
};
let related;
let parent_type;
diff --git a/client/coral-sign-in/components/styles.css b/client/coral-sign-in/components/styles.css
index 81864eb2f..e8458f314 100644
--- a/client/coral-sign-in/components/styles.css
+++ b/client/coral-sign-in/components/styles.css
@@ -106,7 +106,7 @@ input.error{
.userBox a {
color: #2c69b6;
cursor: pointer;
- margin: 0 5px;
+ margin: 0px;
}
.attention {
@@ -128,4 +128,4 @@ input.error{
.action {
margin-top: 15px;
-}
\ No newline at end of file
+}
diff --git a/routes/api/stream/index.js b/routes/api/stream/index.js
index 7455651a5..b06e3566c 100644
--- a/routes/api/stream/index.js
+++ b/routes/api/stream/index.js
@@ -35,7 +35,7 @@ router.get('/', (req, res, next) => {
return Promise.all([
[asset],
comments,
- User.findPublicByIdArray(comments.map((comment) => comment.user_id)),
+ User.findPublicByIdArray(comments.map((comment) => comment.author_id)),
Action.getActionSummaries(comments.map((comment) => comment.id))
]);
})
diff --git a/swagger.yaml b/swagger.yaml
index 9da36d5da..9f25c6f42 100644
--- a/swagger.yaml
+++ b/swagger.yaml
@@ -243,7 +243,7 @@ definitions:
type: string
format: date-time
description: Display name of comment
- user_id:
+ author_id:
type: string
description: User who posted the comment
parent_id: