Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
plugins
/
better-wp-security
/
core
/
packages
/
data
/
src
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * Internal dependencies */ import { apiFetch } from './controls'; import { receiveIndex, receiveUser } from './actions'; export function* getIndex() { const index = yield apiFetch( { path: '/ithemes-security/v1?context=help' } ); yield receiveIndex( index ); } export const getUser = { *fulfill( userId ) { const user = yield apiFetch( { path: `/wp/v2/users/${ userId }`, } ); yield receiveUser( user ); }, isFulfilled( state, userId ) { return !! state.users.byId[ userId ]; }, };