Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
I
Inovasi Daerah Master
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ghitha Dinan
Inovasi Daerah Master
Commits
366ceea3
Commit
366ceea3
authored
Sep 27, 2021
by
Ghitha Dinan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add public service
parent
d119a25f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
1 deletion
+55
-1
SecurityConstant.kt
...uriang/inovasi/daerah/master/constant/SecurityConstant.kt
+5
-1
PublicController.kt
...iang/inovasi/daerah/master/controller/PublicController.kt
+50
-0
No files found.
src/main/kotlin/id/co/sangkuriang/inovasi/daerah/master/constant/SecurityConstant.kt
View file @
366ceea3
package
id.co.sangkuriang.inovasi.daerah.master.constant
package
id.co.sangkuriang.inovasi.daerah.master.constant
const
val
SECRET
=
"
PUJA-IND
AH"
const
val
SECRET
=
"
INOVASI-DAER
AH"
const
val
TOKEN_PREFIX
=
"Bearer "
const
val
TOKEN_PREFIX
=
"Bearer "
const
val
HEADER_STRING
=
"Authorization"
const
val
HEADER_STRING
=
"Authorization"
val
TOKEN_FILTER_PATTERNS
=
val
TOKEN_FILTER_PATTERNS
=
listOf
(
listOf
(
"tag"
,
"application-category"
,
"province"
,
"regency"
,
"tag"
"tag"
)
)
src/main/kotlin/id/co/sangkuriang/inovasi/daerah/master/controller/PublicController.kt
0 → 100644
View file @
366ceea3
package
id.co.sangkuriang.inovasi.daerah.master.controller
import
id.co.sangkuriang.inovasi.daerah.master.model.request.PaginationRequest
import
id.co.sangkuriang.inovasi.daerah.master.service.ApplicationCategoryService
import
id.co.sangkuriang.inovasi.daerah.master.service.ProvinceService
import
id.co.sangkuriang.inovasi.daerah.master.service.RegencyService
import
id.co.sangkuriang.inovasi.daerah.master.service.TagService
import
org.springframework.beans.factory.annotation.Autowired
import
org.springframework.http.ResponseEntity
import
org.springframework.web.bind.annotation.GetMapping
import
org.springframework.web.bind.annotation.RequestMapping
import
org.springframework.web.bind.annotation.RestController
@RestController
@RequestMapping
(
path
=
[
"public"
])
class
PublicController
{
@Autowired
private
lateinit
var
applicationCategoryService
:
ApplicationCategoryService
@Autowired
private
lateinit
var
tagService
:
TagService
@Autowired
private
lateinit
var
provinceService
:
ProvinceService
@Autowired
private
lateinit
var
regencyService
:
RegencyService
@GetMapping
(
value
=
[
"application-category/all"
],
produces
=
[
"application/json"
])
fun
applicationCategoryAll
(
page
:
PaginationRequest
):
ResponseEntity
<*>?
{
return
applicationCategoryService
.
getAll
(
page
)
}
@GetMapping
(
value
=
[
"tag/all"
],
produces
=
[
"application/json"
])
fun
tagAll
(
page
:
PaginationRequest
):
ResponseEntity
<*>?
{
return
tagService
.
getAll
(
page
)
}
@GetMapping
(
value
=
[
"province/all"
],
produces
=
[
"application/json"
])
fun
provinceAll
(
page
:
PaginationRequest
):
ResponseEntity
<*>?
{
return
provinceService
.
getAll
(
page
)
}
@GetMapping
(
value
=
[
"regency/all"
],
produces
=
[
"application/json"
])
fun
regencyAll
(
page
:
PaginationRequest
):
ResponseEntity
<*>?
{
return
regencyService
.
getAll
(
page
)
}
}
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