mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-21 08:01:49 +03:00
faf34a7d26
example app to use new queries, removed old Wasp code from it.
9 lines
221 B
JavaScript
9 lines
221 B
JavaScript
import state from './state.js'
|
|
|
|
export const createTask = (task, context) => {
|
|
if (Math.random() < 0.5) {
|
|
throw new Error('Failed to create task, random error!')
|
|
}
|
|
state.tasks = [...(state.tasks || []), task]
|
|
}
|