Fix key for repo relationship for V3 API
This commit is contained in:
parent
c3fd0d8e98
commit
a732a18e59
|
@ -51,6 +51,14 @@ var Serializer = V2FallbackSerializer.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
keyForRelationship(key, typeClass, method) {
|
||||||
|
if (key === 'repo') {
|
||||||
|
return 'repository';
|
||||||
|
} else {
|
||||||
|
return this._super.apply(this, arguments);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
normalize: function(modelClass, resourceHash) {
|
normalize: function(modelClass, resourceHash) {
|
||||||
var data, href, id, repoId, result;
|
var data, href, id, repoId, result;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,12 @@ Serializer = V2FallbackSerializer.extend
|
||||||
_started_at: { key: 'started_at' }
|
_started_at: { key: 'started_at' }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
keyForV2Relationship: (key, typeClass, method) ->
|
||||||
|
if key == 'repo'
|
||||||
|
'repository'
|
||||||
|
else
|
||||||
|
@_super.apply(this, arguments)
|
||||||
|
|
||||||
keyForV2Relationship: (key, typeClass, method) ->
|
keyForV2Relationship: (key, typeClass, method) ->
|
||||||
if key == 'repo'
|
if key == 'repo'
|
||||||
'repository_id'
|
'repository_id'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user