移除部分无用代码
This commit is contained in:
parent
53b38a3307
commit
17bcde7a8e
@ -49,8 +49,6 @@ dependencies {
|
||||
implementation 'io.jsonwebtoken:jjwt-api:0.12.6'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
|
||||
testImplementation 'org.springframework.security:spring-security-test'
|
||||
compileOnly 'org.projectlombok:lombok'
|
||||
annotationProcessor 'org.projectlombok:lombok'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
runtimeOnly 'org.postgresql:postgresql'
|
||||
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6'
|
||||
|
@ -1,6 +1,5 @@
|
||||
package dev.surl.surl.controller
|
||||
|
||||
import dev.surl.surl.cfg.logger
|
||||
import dev.surl.surl.common.Msg
|
||||
import dev.surl.surl.service.SurlService
|
||||
import dev.surl.surl.util.JwtTokenUtil
|
||||
@ -16,9 +15,7 @@ class SurlGetController(
|
||||
) {
|
||||
@GetMapping(path = ["/api/surl/get"])
|
||||
fun getUrlsByUser(@RequestHeader headers: HttpHeaders): Msg<List<String>> {
|
||||
logger().logger().info("headers: $headers")
|
||||
val token = jwtTokenUtil.getTokenFromHeader(headers[HttpHeaders.AUTHORIZATION]?.last() ?: "")
|
||||
logger().logger().info("token: $token")
|
||||
val username = jwtTokenUtil.getUsernameFromToken(token)
|
||||
val urls = surlService.getUrlsByUser(username)
|
||||
return Msg(value = urls)
|
||||
|
@ -41,7 +41,7 @@ spring:
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
Exposed: info
|
||||
Exposed: debug
|
||||
base:
|
||||
configs:
|
||||
site: http://127.0.0.1:18888
|
||||
|
Loading…
Reference in New Issue
Block a user