Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-rest
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-rest
Commits
a5c540c5
Commit
a5c540c5
authored
Jun 14, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Replaced ns_httpget by im_httpget
parent
4576730a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
intranet-rest-validator-procs.tcl
tcl/intranet-rest-validator-procs.tcl
+15
-15
domain-proxy.tcl
www/data-source/domain-proxy.tcl
+1
-1
No files found.
tcl/intranet-rest-validator-procs.tcl
View file @
a5c540c5
...
...
@@ -182,9 +182,9 @@ ad_proc -private im_rest_validate_list {
db_foreach otypes
$otypes
_sql
{
set operation
"list"
set url
[
export_vars -base
"
$rest
_url/
$object
_type"
{
auth_token
{
user_id
$rest
_user_id
}
{
format
json
}
}]
ns_log Notice
"im_rest_validate_list:
$object
_type: Before
ns
_httpget
$url
"
set result
[
ns
_httpget
$url
]
ns_log Notice
"im_rest_validate_list:
$object
_type: After
ns
_httpget
$url
"
ns_log Notice
"im_rest_validate_list:
$object
_type: Before
im
_httpget
$url
"
set result
[
im
_httpget
$url
]
ns_log Notice
"im_rest_validate_list:
$object
_type: After
im
_httpget
$url
"
set parsed_result
[
util::json::parse
$result
]
array unset result_hash
array set result_hash
[
lindex
$parsed
_result 1
]
...
...
@@ -243,9 +243,9 @@ ad_proc -private im_rest_validate_projects {
if
{
$validate
_create_p
}
{
set operation
"create"
set url
[
export_vars -base
"
$rest
_url/im_project"
{
auth_token
{
user_id
$rest
_user_id
}
project_id
{
format
json
}
}]
ns_log Notice
"im_rest_validate_projects - create: Before
ns_httpge
t
$url
"
set result
[
ns
_httppost
$url
]
ns_log Notice
"im_rest_validate_projects - create: After
ns_httpge
t
$url
"
ns_log Notice
"im_rest_validate_projects - create: Before
im_httppos
t
$url
"
set result
[
im
_httppost
$url
]
ns_log Notice
"im_rest_validate_projects - create: After
im_httppos
t
$url
"
set parsed_result
[
util::json::parse
$result
]
array unset result_hash
array set result_hash
[
lindex
$parsed
_result 1
]
...
...
@@ -326,9 +326,9 @@ ad_proc -private im_rest_validate_projects {
if
{
$validate
_list_p
}
{
set operation
"list"
set url
[
export_vars -base
"
$rest
_url/im_project"
{
auth_token
{
user_id
$rest
_user_id
}
project_id
{
format
json
}
}]
ns_log Notice
"im_rest_validate_projects - list: Before
ns
_httpget
$url
"
set result
[
ns
_httpget
$url
]
ns_log Notice
"im_rest_validate_projects - list: After
ns
_httpget
$url
"
ns_log Notice
"im_rest_validate_projects - list: Before
im
_httpget
$url
"
set result
[
im
_httpget
$url
]
ns_log Notice
"im_rest_validate_projects - list: After
im
_httpget
$url
"
set parsed_result
[
util::json::parse
$result
]
array unset result_hash
array set result_hash
[
lindex
$parsed
_result 1
]
...
...
@@ -354,9 +354,9 @@ ad_proc -private im_rest_validate_projects {
if
{
$validate
_read_p
}
{
set operation
"read"
set url
[
export_vars -base
"
$rest
_url/im_project/
$project
_id"
{
auth_token
{
user_id
$rest
_user_id
}
{
format
json
}
}]
ns_log Notice
"im_rest_validate_projects: Before
ns
_httpget
$url
"
set result
[
ns
_httpget
$url
]
ns_log Notice
"im_rest_validate_projects: After
ns
_httpget
$url
"
ns_log Notice
"im_rest_validate_projects: Before
im
_httpget
$url
"
set result
[
im
_httpget
$url
]
ns_log Notice
"im_rest_validate_projects: After
im
_httpget
$url
"
set parsed_result
[
util::json::parse
$result
]
array unset result_hash
array set result_hash
[
lindex
$parsed
_result 1
]
...
...
@@ -391,9 +391,9 @@ ad_proc -private im_rest_validate_projects {
set url
"
$rest
_url/im_project/
$project
_id"
set url
[
export_vars -base
"
$rest
_url/im_project/
$project
_id"
{
auth_token
{
user_id
$rest
_user_id
}
{
format
json
}
}]
ns_log Notice
"im_rest_validate_projects: Before
ns
_httppost
$url
"
set result
[
ns
_httppost
$url
""
""
]
ns_log Notice
"im_rest_validate_projects: After
ns
_httppost
$url
"
ns_log Notice
"im_rest_validate_projects: Before
im
_httppost
$url
"
set result
[
im
_httppost
$url
""
""
]
ns_log Notice
"im_rest_validate_projects: After
im
_httppost
$url
"
ad_return_complaint 1
"<pre>
$result
</pre>"
set parsed_result
[
util::json::parse
$result
]
array unset result_hash
...
...
www/data-source/domain-proxy.tcl
View file @
a5c540c5
...
...
@@ -26,7 +26,7 @@ ns_log Notice "/intranet-rest/data-source/domain-proxy.tcl: url=$url"
# Fetch and return the page
#
if
{[
catch
{
set json
[
ns
_httpget
$url
]
set json
[
im
_httpget
$url
]
}
err_msg
]}
{
set json
"{'success': false, 'message': 'Error message:
$err
_msg'}"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment