async getEntity()

in src/lib/service/custos-service/custos-service-entities/index.js [107:121]


    async getEntity({clientId, entityId}) {
        const axiosInstance = await this.custosService.axiosInstance;
        const {data} = await axiosInstance.get(
            `${CustosService.ENDPOINTS.SHARING}/entity`,
            {
                params: {"entity.id": entityId}
            }
        );
        if (data.type === "SECRET") {
            data.metadata = await this.custosService.entities.secrets.getSecretMetadata({clientId, entityId: data.id});
            data.ext = await this.custosService.entities.secrets.getSecret({clientId, entityId: data.id});
        }

        return data;
    }