I noticed that it's possible to create subdirectory models with ember cli. So I can do
ember g model log/type1-log
This creates a log directory with the type1-log model inside it. The reason I attempted this was because of my api structure.
/api/v1/logs/
/api/v1/logs/type1-log
/api/v1/logs/type2-log
/api/v1/logs-type3-log
Initially I was doing ember g model type1-log, but that model was doing api requests to /api/v1/type1-log. I wanted it to be doing api/v1/logs/type1-log.
Are sub directory models supported by Ember, or should I actually be updating my Adapter to modify the url?
Aucun commentaire:
Enregistrer un commentaire