Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/IOT-1209-MoveGateway #256

Merged
merged 12 commits into from
Sep 13, 2024
Merged

Feature/IOT-1209-MoveGateway #256

merged 12 commits into from
Sep 13, 2024

Conversation

MadsApollo
Copy link
Contributor

No description provided.

@MadsApollo
Copy link
Contributor Author

internalOrganizationId, bliver opdateret med kald til modifyGateway i chirpstack-gateway.service.
Der bliver her også tjekket om man har adgang hertil. Er det fint at den bliver opdateret, du snakkede om at den måske blev brugt til at se hvor den er oprettet.
image

@MadsApollo MadsApollo changed the title Added endpoint to update organization id for gateways. Feature/IOT-1209-MoveGateway Sep 12, 2024
@Body() dto: UpdateGatewayOrganizationDto
): Promise<DbGateway> {
checkIfUserHasAccessToOrganization(req, dto.organizationId, OrganizationAccessScope.GatewayWrite);
const gateway = await this.chirpstackGatewayService.updateOrganization(id, dto, req);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jeg skal have et fail log.

where: { id: gatewayId },
relations: [nameof<DbGateway>("organization")],
});
checkIfUserHasAccessToOrganization(req, dto.organizationId, OrganizationAccessScope.GatewayWrite);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Du har allerede lavet access checket i controlleren, så ingen grund til at gøre det igen

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var lidt i tvivl om hvordan deres decorators helt præcis er stykket sammen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah kan se at kaldet faktisk også er i controlleren , gotcha

@@ -7,6 +7,9 @@ export class UpdateGatewayContentsDto extends OmitType(GatewayContentsDto, ["gat
@ApiHideProperty()
gatewayId: string;

@ApiHideProperty()
organizationId?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bruges den her nogen steder?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nej, havde en ide om at modificere update dto'en, til at både opdatere chirpstack og db'en. jeg fjerner den.

Base automatically changed from feature/1583-MoveApplication to stage September 13, 2024 07:24
@MadsApollo MadsApollo merged commit a280b45 into stage Sep 13, 2024
1 of 4 checks passed
@MadsApollo MadsApollo deleted the feature/1209-MoveGateway branch September 13, 2024 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants