ENH: Collection attachments (#51)

This commit is contained in:
Matthew Ryan Dillon 2017-12-01 10:58:17 -07:00 committed by GitHub
parent d014fc099c
commit 4903a204e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 217 additions and 16 deletions

View 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;
},
});