Skip to content

Commit

Permalink
Redirect to list
Browse files Browse the repository at this point in the history
  • Loading branch information
andyksaw committed Nov 25, 2024
1 parent acfc3e4 commit 040a455
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class BuildsCommand(
.then(command = buildMoveCommand)
.then(command = buildVoteCommand)
.then(command = buildDeleteCommand)
.redirect(buildListCommand.buildLiteral())
.executes(buildListCommand.buildLiteral().command)
.build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class BuildRepository(
if (cache == null) {
fetchIdMap()
}
val id = cache?.get(name) ?: throw Exception("Build not found")
val id = cache?.get(name) ?: throw IllegalStateException("Build not found")

return buildHttpService.update(
id = id,
Expand All @@ -117,7 +117,7 @@ class BuildRepository(
if (cache == null) {
fetchIdMap()
}
val id = cache?.get(name) ?: throw Exception("Build not found")
val id = cache?.get(name) ?: throw IllegalStateException("Build not found")

buildHttpService.delete(
id = id,
Expand All @@ -130,7 +130,7 @@ class BuildRepository(
if (cache == null) {
fetchIdMap()
}
val id = cache?.get(name) ?: throw Exception("Build not found")
val id = cache?.get(name) ?: throw IllegalStateException("Build not found")

return buildHttpService.vote(
id = id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.projectcitybuild.pcbridge.paper.features.staffchat.commands

import com.projectcitybuild.pcbridge.paper.Permissions
import com.projectcitybuild.pcbridge.paper.core.libs.remoteconfig.services.RemoteConfig
import com.projectcitybuild.pcbridge.http.models.pcb.RemoteConfigKeyValues
import com.projectcitybuild.pcbridge.http.models.pcb.RemoteConfigVersion
Expand Down

0 comments on commit 040a455

Please sign in to comment.