summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-01-18 18:32:59 +0100
committernsensfel <SpamShield0@noot-noot.org>2019-01-18 18:32:59 +0100
commit93e613bb5bbb1eb58135e68bb184c7cf6d230ad8 (patch)
tree5442d50d8145fae6dc074b776979e128b2757c7a /src/ataxia_client.erl
parent44c976dd490accd3eed1ff49b5df476bcdb6c9b8 (diff)
Fixes position of ID param for add_at & reserve_at
Diffstat (limited to 'src/ataxia_client.erl')
-rw-r--r--src/ataxia_client.erl24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ataxia_client.erl b/src/ataxia_client.erl
index 9968f85..5e8659e 100644
--- a/src/ataxia_client.erl
+++ b/src/ataxia_client.erl
@@ -75,15 +75,15 @@ get_db_node_for (_ObjectID) ->
-spec add_at
(
atom(),
- ataxia_id:type(),
ataxia_security:user(),
- any()
+ any(),
+ ataxia_id:type()
)
-> ('ok' | ataxia_error:type()).
-add_at (DB, ID, User, Value) ->
+add_at (DB, User, Value, ID) ->
Permission = ataxia_security:allow_only(User),
- add_at(DB, ID, Permission, Permission, ataxia_lock:unlocked(), Value).
+ add_at(DB, Permission, Permission, ataxia_lock:unlocked(), Value, ID).
-spec add
(
@@ -126,14 +126,14 @@ reserve_at (DB, User, ID) ->
-spec add_at
(
atom(),
- ataxia_id:type(),
ataxia_security:permission(),
ataxia_security:permission(),
- any()
+ any(),
+ ataxia_id:type()
)
-> ('ok' | ataxia_error:type()).
-add_at (DB, ID, ReadPerm, WritePerm, Value) ->
- add_at(DB, ID, ReadPerm, WritePerm, ataxia_lock:unlocked(), Value).
+add_at (DB, ReadPerm, WritePerm, Value, ID) ->
+ add_at(DB, ReadPerm, WritePerm, ataxia_lock:unlocked(), Value, ID).
-spec add
(
@@ -173,14 +173,14 @@ reserve_at (DB, ReadPerm, WritePerm, ID) ->
-spec add_at
(
atom(),
- ataxia_id:type(),
ataxia_security:permission(),
ataxia_security:permission(),
ataxia_lock:type(),
- any()
+ any(),
+ ataxia_id:type()
)
-> ('ok' | ataxia_error:type()).
-add_at (DB, ID, ReadPerm, WritePerm, Lock, Value) ->
+add_at (DB, ReadPerm, WritePerm, Lock, Value, ID) ->
DBNode = get_db_node_for(ID),
Reply =
@@ -189,7 +189,7 @@ add_at (DB, ID, ReadPerm, WritePerm, Lock, Value) ->
DBNode,
ataxia_server,
add_at,
- [DB, ID, ReadPerm, WritePerm, Lock, Value]
+ [DB, ReadPerm, WritePerm, Lock, Value, ID]
),
io:format