Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-tools
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 36805cfc
authored
Aug 08, 2022
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
syart pelayanan api
1 parent
f39fa143
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
opensipkd/tools/api.py
opensipkd/tools/form_api.py
opensipkd/tools/api.py
View file @
36805cf
...
...
@@ -302,9 +302,10 @@ def validate_time(request):
return
time_stamp
def
get_jsonrpc
(
method
,
params
):
def
get_jsonrpc
(
method
,
params
,
**
kwargs
):
rid
=
kwargs
.
get
(
"id"
)
or
int
(
get_random_number
(
6
))
return
dict
(
jsonrpc
=
'2.0'
,
method
=
method
,
params
=
params
,
id
=
int
(
get_random_number
(
6
))
)
id
=
rid
)
def
send_rpc
(
auth
,
message
):
"""
...
...
opensipkd/tools/form_api.py
View file @
36805cf
...
...
@@ -50,6 +50,7 @@ def form2dict(obj):
elif
v
and
hasattr
(
v
,
"__dict__"
)
and
\
getattr
(
v
,
"__dict__"
,
str
(
v
)):
log
.
debug
(
v
)
d
[
k
]
=
form2dict
(
v
)
elif
isinstance
(
v
,
list
):
lv
=
[]
...
...
@@ -108,6 +109,7 @@ def formfield2dict(obj):
buttons
=
resp
[
"buttons"
],
url
=
resp
.
get
(
"url"
),
table
=
table
,
method
=
resp
.
get
(
"method"
)
)
log
.
debug
(
result
)
return
result
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment