mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-09-13 18:59:25 +00:00
♻️ refactor: migrate to Go Kubernetes operator
This commit is contained in:
@@ -9,6 +9,7 @@ import type {
|
||||
ReverseProxyRepository,
|
||||
ReverseProxyUpdateInput,
|
||||
} from "../../domain/repositories/reverse-proxy.repository";
|
||||
import type { OperatorResourceSync } from "../../services/operator-resource-sync";
|
||||
import type { IReverseProxyService } from "../interfaces/reverse-proxy.service.interface";
|
||||
import { BaseCrudService } from "./base-crud.service";
|
||||
|
||||
@@ -26,7 +27,10 @@ export class ReverseProxyService
|
||||
>
|
||||
implements IReverseProxyService
|
||||
{
|
||||
constructor(reverseProxyRepo: ReverseProxyRepository) {
|
||||
constructor(
|
||||
reverseProxyRepo: ReverseProxyRepository,
|
||||
private operatorResourceSync: OperatorResourceSync
|
||||
) {
|
||||
super(
|
||||
reverseProxyRepo,
|
||||
{
|
||||
@@ -65,4 +69,14 @@ export class ReverseProxyService
|
||||
deleteReverseProxy(id: string) {
|
||||
return this.delete(id);
|
||||
}
|
||||
|
||||
override async setEnvVariable(proxyId: string, key: string, value: string): Promise<void> {
|
||||
await super.setEnvVariable(proxyId, key, value);
|
||||
await this.operatorResourceSync.syncReverseProxyById(proxyId);
|
||||
}
|
||||
|
||||
override async deleteEnvVariable(proxyId: string, key: string): Promise<void> {
|
||||
await super.deleteEnvVariable(proxyId, key);
|
||||
await this.operatorResourceSync.syncReverseProxyById(proxyId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user