Fixed apiToken validation, blank OR not contains ':'
This commit is contained in:
parent
f2c3cdca73
commit
87c70329d1
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ open class PinboardPoster(var apiToken: String) {
|
|||
}
|
||||
|
||||
private fun validate(): Boolean {
|
||||
if (apiToken.isBlank() && !apiToken.contains(':')) {
|
||||
if (apiToken.isBlank() || !apiToken.contains(':')) {
|
||||
logger.severe("Please specify a valid API token. (eg. user:TOKEN)")
|
||||
return false
|
||||
} else if (!validateUrl(apiEndPoint)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue