Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hashdb-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cool Fire
hashdb-api
Commits
74467e9e
Commit
74467e9e
authored
Sep 04, 2019
by
Cool Fire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always return json
parent
e2d71fe3
Pipeline
#1768
failed with stages
in 2 minutes and 29 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
hashdb_api.rb
hashdb_api.rb
+5
-1
routes/v1.rb
routes/v1.rb
+0
-2
No files found.
hashdb_api.rb
View file @
74467e9e
...
...
@@ -10,8 +10,12 @@ class HashDbApi < Sinatra::Base
enable
:lock
set
:database_prefix
,
'/databases/'
before
do
content_type
:json
end
get
'/'
do
'No
thing here but us chickens'
'No
body here but us chickens'
.
to_json
end
end
...
...
routes/v1.rb
View file @
74467e9e
...
...
@@ -24,7 +24,6 @@ class HashDbApi < Sinatra::Base
hashes
[
'password'
]
=
params
[
'password'
]
# Show results
content_type
:json
hashes
.
to_json
end
...
...
@@ -47,7 +46,6 @@ class HashDbApi < Sinatra::Base
db
.
close
# Format and return result
content_type
:json
{
'hash'
:
params
[
'hash'
],
'found'
:
!
result
.
nil?
,
...
...
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