* @brief Re-validate the active license against the LemonSqueezy server. */
| 241 | * @brief Re-validate the active license against the LemonSqueezy server. |
| 242 | */ |
| 243 | API::CommandResponse API::Handlers::LicensingHandler::validate(const QString& id, |
| 244 | const QJsonObject&) |
| 245 | { |
| 246 | auto& ls = Licensing::LemonSqueezy::instance(); |
| 247 | |
| 248 | if (ls.busy()) { |
| 249 | return CommandResponse::makeError( |
| 250 | id, ErrorCode::ExecutionError, QStringLiteral("Licensing operation already in progress")); |
| 251 | } |
| 252 | |
| 253 | ls.validate(); |
| 254 | return CommandResponse::makeSuccess(id, {}); |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * @brief Get the current license activation state and customer info. |