Commit 4af2d9d9 authored by Ghitha Dinan's avatar Ghitha Dinan

add public province get by name

parent f9dd79b5
...@@ -2,8 +2,8 @@ package id.co.sangkuriang.inovasi.daerah.master.constant ...@@ -2,8 +2,8 @@ package id.co.sangkuriang.inovasi.daerah.master.constant
import java.io.File import java.io.File
//const val ROOT_DIR = "D:\\app-files\\inovasi_daerah_master\\files\\" const val ROOT_DIR = "D:\\app-files\\inovasi_daerah_master\\files\\"
const val ROOT_DIR = "/home/inovasi-daerah/data/files/inovasi_daerah_master/" //const val ROOT_DIR = "/home/inovasi-daerah/data/files/inovasi_daerah_master/"
val UPLOAD_DIR = "${ROOT_DIR}uploads${File.separator}" val UPLOAD_DIR = "${ROOT_DIR}uploads${File.separator}"
val UPLOAD_ICON_APPLICATION_CATEGORY_DIR = "${UPLOAD_DIR}apllication_category/icon" val UPLOAD_ICON_APPLICATION_CATEGORY_DIR = "${UPLOAD_DIR}apllication_category/icon"
......
...@@ -2,9 +2,9 @@ package id.co.sangkuriang.inovasi.daerah.master.constant ...@@ -2,9 +2,9 @@ package id.co.sangkuriang.inovasi.daerah.master.constant
const val TOKEN_PREFIX = "Bearer " const val TOKEN_PREFIX = "Bearer "
const val HEADER_STRING = "Authorization" const val HEADER_STRING = "Authorization"
//const val AUTH_URL = "http://localhost:8081/auth" const val AUTH_URL = "http://localhost:8081/auth"
//const val AUTH_URL = "https://auth.inovasi-daerah.dev.layanan.go.id/auth" //const val AUTH_URL = "https://auth.inovasi-daerah.dev.layanan.go.id/auth"
const val AUTH_URL = "http://inovasi-daerah-auth.inovasi-daerah.svc.cluster.local:8081/auth" //const val AUTH_URL = "http://inovasi-daerah-auth.inovasi-daerah.svc.cluster.local:8081/auth"
val USER_ALLOWED_PATH = emptyList<String>() val USER_ALLOWED_PATH = emptyList<String>()
......
...@@ -32,11 +32,6 @@ class ProvinceController { ...@@ -32,11 +32,6 @@ class ProvinceController {
return service.getDetail(id) return service.getDetail(id)
} }
@GetMapping(value = ["get-by-name"], produces = ["application/json"])
fun getByName(@RequestParam("name") name: String): ResponseEntity<*>? {
return service.getByName(name)
}
@PostMapping(value = [""], produces = ["application/json"]) @PostMapping(value = [""], produces = ["application/json"])
fun saveData(@Valid @RequestBody request: Province): ResponseEntity<*>? { fun saveData(@Valid @RequestBody request: Province): ResponseEntity<*>? {
return service.saveData(request) return service.saveData(request)
......
...@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired ...@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.ResponseEntity import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController import org.springframework.web.bind.annotation.RestController
@RestController @RestController
...@@ -42,6 +43,11 @@ class PublicController { ...@@ -42,6 +43,11 @@ class PublicController {
return provinceService.getAll(page) return provinceService.getAll(page)
} }
@GetMapping(value = ["province/get-by-name"], produces = ["application/json"])
fun provinceGetByName(@RequestParam("name") name: String): ResponseEntity<*>? {
return provinceService.getByName(name)
}
@GetMapping(value = ["regency/all"], produces = ["application/json"]) @GetMapping(value = ["regency/all"], produces = ["application/json"])
fun regencyAll(page: PaginationRequest): ResponseEntity<*>? { fun regencyAll(page: PaginationRequest): ResponseEntity<*>? {
return regencyService.getAll(page) return regencyService.getAll(page)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<!-- configuration file for LogBack (slf4J implementation) <!-- configuration file for LogBack (slf4J implementation)
See here for more details: http://gordondickens.com/wordpress/2013/03/27/sawing-through-the-java-loggers/ --> See here for more details: http://gordondickens.com/wordpress/2013/03/27/sawing-through-the-java-loggers/ -->
<configuration scan="true" scanPeriod="30 seconds"> <configuration scan="true" scanPeriod="30 seconds">
<!-- <property name="DEV_HOME" value="D://app-files//inovasi_daerah_master//log"/>--> <property name="DEV_HOME" value="D://app-files//inovasi_daerah_master//log"/>
<property name="DEV_HOME" value="/home/inovasi-daerah/data/log/inovasi_daerah_master"/> <!-- <property name="DEV_HOME" value="/home/inovasi-daerah/data/log/inovasi_daerah_master"/>-->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment