mirror of
https://github.com/dalbodeule/sh0rt.kr-pdns.git
synced 2025-08-09 21:21:12 +00:00
useless code fix
This commit is contained in:
@@ -167,7 +167,11 @@ class PowerDNSAPIClient() {
|
|||||||
data class PowerDNSAPIError(
|
data class PowerDNSAPIError(
|
||||||
@SerializedName("error") val error: String,
|
@SerializedName("error") val error: String,
|
||||||
@SerializedName("errors") val errors: List<String>?
|
@SerializedName("errors") val errors: List<String>?
|
||||||
)
|
) {
|
||||||
|
override fun toString(): String {
|
||||||
|
return "PowerDNSAPIError(error=$error, errors=${errors?.joinToString(", ")})"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class PowerDNSAPIErrorDeserializer : JsonDeserializer<PowerDNSAPIError?> {
|
class PowerDNSAPIErrorDeserializer : JsonDeserializer<PowerDNSAPIError?> {
|
||||||
@Throws(JsonParseException::class)
|
@Throws(JsonParseException::class)
|
||||||
|
@@ -183,8 +183,6 @@ class RecordService(
|
|||||||
if(domain.user.id != user.id)
|
if(domain.user.id != user.id)
|
||||||
throw RuntimeException("Unauthorized to create record in API: $domain_id")
|
throw RuntimeException("Unauthorized to create record in API: $domain_id")
|
||||||
|
|
||||||
println("$domain, $record_id")
|
|
||||||
|
|
||||||
val record = recordRepository.findByDomainIdAndCfid(domain.id!!, record_id).orElseThrow {
|
val record = recordRepository.findByDomainIdAndCfid(domain.id!!, record_id).orElseThrow {
|
||||||
RuntimeException("Failed to find record in API: $record_id")
|
RuntimeException("Failed to find record in API: $record_id")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user