Skip to content

Commit 3536f6b

Browse files
committed
Refactoring
1 parent db0b4f8 commit 3536f6b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/vuex-orm-apollo.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,7 @@ export default class VuexORMApollo {
157157

158158
const model = this.getModel(state.$name);
159159

160-
await this.mutate(name, args, dispatch, model);
161-
162-
// TODO What would make sense here?
163-
return true;
160+
return await this.mutate(name, args, dispatch, model);
164161
}
165162

166163
/**
@@ -196,14 +193,10 @@ export default class VuexORMApollo {
196193
* @returns {Promise<void>}
197194
*/
198195
private async destroy ({ state, dispatch }: ActionParams, { id }: ActionParams): Promise<any> {
199-
200196
if (id) {
201197
const model = this.getModel(state.$name);
202198
const mutationName = `delete${upcaseFirstLetter(model.singularName)}`;
203-
await this.mutate(mutationName, { id }, dispatch, model, false);
204-
205-
// TODO what would make sense here?
206-
return true;
199+
return await this.mutate(mutationName, { id }, dispatch, model, false);
207200
}
208201
}
209202

0 commit comments

Comments
 (0)