1
0
Fork 0

Integrated Penelope and Waralee patterns, plus 2.1 prep

Penelope and Waralee are two new patterns by @woutervdub
This integrates them in our monorepo, including the translations
in the i18n package and the package info in the pattern-info pattern

This commit also includes a minor tweak to our core package.
Previously, you had to instantiate a pattern to get its config,
but that is no longer the case. The default export (the constructor)
now has a config property you can access without instantiating the pattern.

All of these changes will trigger a new minor release when we merge them
into master. Specifically v2.1
This commit is contained in:
Joost De Cock 2019-09-21 19:42:53 +02:00
parent 6fe5177377
commit 261da52c3b
58 changed files with 12190 additions and 2088 deletions

View file

@ -49,6 +49,13 @@ function useBackend(baseURL, timeout = 10000) {
backend.removeRecipe = (handle, token) => api.delete('/recipes/' + handle, auth(token)) // Remove recipe
backend.saveRecipe = (handle, data, token) => api.put('/recipes/' + handle, data, auth(token)) // Update recipe
// Admin
backend.adminSearch = (query, token) => api.post('/admin/search', { query }, auth(token)) // Search users as admin
backend.adminSetPatronStatus = (data, token) => api.put('/admin/patron', data, auth(token)) // Set patron status for a user
backend.adminSetRole = (data, token) => api.put('/admin/role', data, auth(token)) // Set role for a user
backend.adminUnfreeze = (data, token) => api.put('/admin/unfreeze', data, auth(token)) // Unfreeze a user account
backend.adminImpersonate = (data, token) => api.post('/admin/impersonate', data, auth(token)) // Impersonate a user
return backend
}