sesterce-cli
Version:
A powerful command-line interface tool for managing Sesterce Cloud services. Sesterce CLI provides easy access to GPU cloud instances, AI inference services, container registries, and SSH key management directly from your terminal.
23 lines • 853 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UpdateRegistry = void 0;
const either_1 = require("@/core/logic/either");
const update_registry_error_1 = require("./errors/update-registry-error");
class UpdateRegistry {
constructor(apiClient) {
this.apiClient = apiClient;
}
async execute({ id, ...dto }) {
try {
await this.apiClient.patch(`/ai-inference/registries/${id}`, {
body: JSON.stringify(dto),
});
return (0, either_1.right)(null);
}
catch (error) {
return (0, either_1.left)(new update_registry_error_1.UpdateRegistryError(error instanceof Error ? error.message : "Unexpected error occurred."));
}
}
}
exports.UpdateRegistry = UpdateRegistry;
//# sourceMappingURL=update-registry.js.map