ENH: Collection attachments (#51)
This commit is contained in:
parent
d014fc099c
commit
4903a204e4
14 changed files with 217 additions and 16 deletions
19
app/adapters/datasheet-attachment.js
Normal file
19
app/adapters/datasheet-attachment.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
import ApplicationAdapter from './application';
|
||||
import FileUploadAdapter from 'ccdb-web/mixins/file-upload';
|
||||
|
||||
export default ApplicationAdapter.extend(FileUploadAdapter, {
|
||||
getFormFields(data) {
|
||||
return {
|
||||
'datasheet': data['data']['attributes']['datasheet'],
|
||||
'collection': JSON.stringify(data['data']['relationships']['collection']['data']),
|
||||
}
|
||||
},
|
||||
|
||||
getFormKey(key) {
|
||||
return key;
|
||||
},
|
||||
|
||||
getFormValue(key, value) {
|
||||
return value;
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue