diff --git a/app/actions/profiles.js b/app/actions/profiles.js index f07f0c4..cc639f8 100644 --- a/app/actions/profiles.js +++ b/app/actions/profiles.js @@ -3,10 +3,16 @@ import database from '../db' const profilesCollection = database.collections.get('profiles') export const addProfile = async data => { - await database.action(async () => { + return await database.action(async () => { const res = await profilesCollection.create(profile => { const { addr, canceled, commitTime, type, name, url, idProfile } = data - //TODO add assignemnts + profile.addr = addr + profile.canceled = canceled + profile.commitTime = Number(commitTime) + profile.type = type + profile.name = name + profile.url = url + profile.idProfile = Number(idProfile) }) return res }) diff --git a/app/components/FunderProfilesTable.jsx b/app/components/FunderProfilesTable.jsx index 7a32b23..5b958b6 100644 --- a/app/components/FunderProfilesTable.jsx +++ b/app/components/FunderProfilesTable.jsx @@ -53,5 +53,5 @@ const FunderProfilesTable = ({ cancelFundProfile, profiles }) => ( ) export default withDatabase(withObservables([], ({ database }) => ({ - profiles: database.collections.get('profiles').query().fetch(), + profiles: database.collections.get('profiles').query().observe(), }))(FunderProfilesTable))