-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add conversation mirage setup and remove un-needed mirage models #1652
Conversation
config/environment.js
Outdated
@@ -173,6 +173,7 @@ module.exports = function(environment) { | |||
ENV['simple-auth'] = { | |||
store: 'simple-auth-session-store:ephemeral' | |||
}; | |||
ENV.SOCKETS_BASE_URL = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add this between API/WEB?
return moment().subtract(i, 'days'); | ||
} | ||
// author: belongsTo('user', { async: true }), | ||
// conversation: belongsTo('conversation', { async: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove these two lines.
mirage/models/conversation.js
Outdated
message: belongsTo(), | ||
user: belongsTo(), | ||
conversationParts: hasMany() | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
miragejs/ember-cli-mirage#1056
So mirage can auto generate mirage models based off of the ember-data model, avoiding mismatches b/w the two.
Lmk what you think? We can keep slowly removing these as needed or all of them in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay thanks. Maybe open a separate issue so others are tracking that’s the case as a point of reference?
532d5b3
to
f56e779
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one ought to be safe to merge, since its a QOL PR
a64a355
to
f56e779
Compare
f56e779
to
0d80e3f
Compare
@snewcomer want to squash and merge when you're ready? |
Getting something showing in 4200 land.
Another note/question is if we want mirage to auto-detect the model, thus removing the need to define a mirage model (got in version 0.3.2 I think). Lmk if that is something you want me to remove if the mirage model isn't needed.