Skip to content

Commit c2c769b

Browse files
committed
Add support for sqlite
Add swagger Changed the api logic to store the informations in the database
1 parent 6c324b8 commit c2c769b

File tree

14 files changed

+724
-124
lines changed

14 files changed

+724
-124
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.3.0] - 2020-078-05
8+
### Changed
9+
- Instead of reading the filesystem the checks will run against a sqlite database
10+
11+
### Added
12+
- Support for automatic delete after request
13+
- Counting of downloads
14+
- Support for sqlite
15+
- Swagger Documentation (/api)
16+
717
## [0.2.3] - 2020-07-30
818
### Added
919
- File entry will also return created_at and updated_at

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ If you want to use the JWT Authentication the JWT must contain custom claims wit
4646
- roles (Array)
4747
- permissions (Array)
4848

49-
[POST]: If the claim contains a "*" or the given *PERMISSIONS_PRINT_CREATE* key it will proceed.
50-
[GET]: If the claim contains a "*" or the given *PERMISSIONS_PRINT_READ* key it will proceed.
49+
[POST]: If the claim contains a "*" or the given *PERMISSION_BROWSE_CREATE* key it will proceed.
50+
[GET]: If the claim contains a "*" or the given *PERMISSION_BROWSE_READ* key it will proceed.
51+
[DELETE]: If the claim contains a "*" or the given *PERMISSION_BROWSE_DELETE* key it will proceed.
5152

5253
#### JWT_ACTIVE (env key)
5354

@@ -96,7 +97,8 @@ The port is required if you want to start the application on a differnt port.
9697
"postBackWait": true,
9798
"postBackUrl": "http://where-should-it-be-posted",
9899
"postBackBody": "{}",
99-
"token": "CUSTOM AUTH-TOKEN"
100+
"token": "CUSTOM AUTH-TOKEN",
101+
"autodelete": false
100102
}
101103
```
102104

@@ -121,6 +123,11 @@ Default: true
121123

122124
Provide a boolean value if you want to wait for the complete answer of the postBackProcess.
123125

126+
#### autodelete
127+
Default: false
128+
129+
Provide a boolean value if you want to delete the file on the first download attempt.
130+
124131
If set to false the return value "uploaded" will always be false.
125132

126133
### [GET] /api/browse

database/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!.gitignore
2+
database.sqlite

0 commit comments

Comments
 (0)