d9d7c69432
Add library to manage async resource Make Store reusable for easier testing Move plugin to libs Add getTaskFor getter with tests
13 lines
305 B
JavaScript
13 lines
305 B
JavaScript
import { loadAsyncResource } from 'client/libs/asyncResource';
|
|
|
|
export function fetchUserTasks (store, forceLoad = false) {
|
|
return loadAsyncResource({
|
|
store,
|
|
path: 'tasks',
|
|
url: '/api/v3/tasks/user',
|
|
deserialize (response) {
|
|
return response.data.data;
|
|
},
|
|
forceLoad,
|
|
});
|
|
} |