Skip to content

Commit f87b1e3

Browse files
committed
Minor bugfix.
1 parent a2d336a commit f87b1e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/kotlin/ch/pontius/swissqr/api/cli/TokenCommand.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ class TokenCommand(val tokenStore: MapStore<Token>, val userStore: MapStore<User
6363
/** The [UserId] to create the [Token] for. */
6464
private val userId: UserId by option("-i", "--id").convert { UserId(it) }.required()
6565

66-
/** The [UserId] to create the [Token] for. */
67-
private val remarks: String? by option("-r", "--remark")
66+
/** A description for the [Token]. */
67+
private val description: String? by option("-d", "--description")
6868

6969
/** The [Permission]s the token should have. */
7070
private val roles: List<Permission> by option("-r", "--role").convert { Permission.valueOf(it) }.multiple()
7171

7272
override fun run() {
7373
val user = this@TokenCommand.userStore[this.userId] ?: throw IllegalArgumentException("Failed to create token: User $userId does not exist.")
74-
val token = Token(user, this.roles.toTypedArray(), this.remarks)
74+
val token = Token(user, this.roles.toTypedArray(), this.description)
7575
val duration = measureTimeMillis {
7676
this@TokenCommand.tokenStore.update(token)
7777
}

0 commit comments

Comments
 (0)