Skip to content

Commit

Permalink
feat(UI-1171): refactor project service
Browse files Browse the repository at this point in the history
  • Loading branch information
J1za committed Jan 13, 2025
1 parent 7f0543e commit cd2c618
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/services/projects.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ export class ProjectsService {
return { data: deploymentId, error: undefined };
}

static async get(projectId: string, orgId?: string): Promise<ServiceResponse<Project>> {
static async get(projectId: string): Promise<ServiceResponse<Project>> {
try {
const { project } = await projectsClient.get({ projectId, orgId });
const { project } = await projectsClient.get({ projectId });
if (!project) {
LoggerService.error(namespaces.projectService, i18n.t("projectNotFound", { ns: "services" }));

Expand Down
4 changes: 2 additions & 2 deletions src/store/useProjectStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ const store: StateCreator<ProjectStore> = (set, get) => ({
if (project) {
return { data: project, error: undefined };
}
const currentOrganizationId = useOrganizationStore.getState().currentOrganization?.id;
const { data: responseProject, error } = await ProjectsService.get(projectId, currentOrganizationId);

const { data: responseProject, error } = await ProjectsService.get(projectId);

if (error) {
return { data: undefined, error };
Expand Down

0 comments on commit cd2c618

Please sign in to comment.