don't allow get update without right token

This commit is contained in:
2026-07-25 21:58:24 +03:00
parent 9254829c5d
commit 356d70b737
2 changed files with 2 additions and 4 deletions
@@ -33,10 +33,8 @@ fun Routing.setupAuthMethods(
call.respond(HttpStatusCode.OK)
}
authenticate(AUTH_JWT_NAME) {
get("/chech") { call.respond(HttpStatusCode.OK) }
get(HeathCheck.PATH) { call.respond(HttpStatusCode.OK) }
post(AuthTokenRepository.CHANGE_PASS_PATH) {
authEntryPoint.authTokenRepositoryFactory.create(call.obtainUserId())
.changePassword(call.receive())
@@ -1,13 +1,13 @@
package ru.shadowsparky.vbox.backend.presentation.routing
import io.ktor.server.response.respond
import io.ktor.server.routing.Routing
import io.ktor.server.routing.Route
import io.ktor.server.routing.get
import io.ktor.server.util.getOrFail
import ru.shadowsparky.updater.domain.UpdateFetcher
import ru.shadowsparky.vbox.shared.domain.DYNAMIC_PREFIX
fun Routing.setupUpdates(updateFetcher: UpdateFetcher) {
fun Route.setupUpdates(updateFetcher: UpdateFetcher) {
get("$DYNAMIC_PREFIX/checkUpdates") {
val versionCode = call.parameters.getOrFail(UpdateFetcher.ARG_VERSION_CODE).toLong()
call.respond(updateFetcher.fetch(versionCode))