MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / api

Function api

packages/xadmin/src/index.js:29–40  ·  view source on GitHub ↗
(opt)

Source from the content-addressed store, hash-verified

27const API_CACHE = {}
28
29const api = (opt) => {
30 const resource = opt.resource_name || opt.name
31 if(API_CACHE[resource] == undefined) {
32 const API = config('api')
33 if (API) {
34 API_CACHE[resource] = new API(opt)
35 } else {
36 throw 'App API not implement!!!'
37 }
38 }
39 return API_CACHE[resource]
40}
41
42export default app
43export {

Callers 11

getCodeUrlFunction · 0.90
handle_get_userinfoFunction · 0.90
handle_user_signoutFunction · 0.90
handle_verify_emailFunction · 0.90
handle_get_listFunction · 0.90
handle_delete_itemFunction · 0.90
handle_get_itemFunction · 0.90
handle_save_itemFunction · 0.90
RelateBaseClass · 0.90
handle_delete_itemsFunction · 0.90
handle_change_itemsFunction · 0.90

Calls 1

configFunction · 0.85

Tested by

no test coverage detected