Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4829

urlForCreateRecord's snapshot is empty

$
0
0

@Zorig wrote:

Hi, I have been trying to get project id with following task adapter hence when creating task it should set project by url. On backend REST API their url is not possible to modify by me. When i console.log(snapshot.belongsto) it returns null. Am i have to create project adapter for this to work?

import drfadapter from './drf';
export default drfadapter.extend({
  urlforcreaterecord(modelname, snapshot) {
    let projectid = snapshot.belongsto('project').id;
    return `/${this.namespace}/api/projects/${projectid}/tasks/`;
  }
});

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles