diff options
Diffstat (limited to 'server.lua')
-rw-r--r-- | server.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -77,7 +77,7 @@ return function(env) local txn = acf.transaction.start(parent_txn, true) local function fetch_user(name) - user = name and txn:search('/auth/users')[name] + user = name and txn:fetch('/auth/users')[name] end if user then fetch_user(user) @@ -126,12 +126,12 @@ return function(env) local parent, name, res if path ~= '/' then - parent = txn:search(acf.path.parent(path)) + parent = txn:fetch(acf.path.parent(path)) name = acf.path.name(path) end if method == 'GET' then - local obj = txn:search(path) + local obj = txn:fetch(path) if type(obj) == 'function' then return 404 end @@ -165,7 +165,7 @@ return function(env) end if method == 'POST' then - local obj = txn:search(path) + local obj = txn:fetch(path) if acf.object.isinstance(obj, mnode.List) then if not mnode.has_permission(obj, user, 'create') then |