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

[WIP] Policy file per resource #1175

Closed
wants to merge 13 commits into from
Closed

[WIP] Policy file per resource #1175

wants to merge 13 commits into from

Conversation

elaygl
Copy link
Contributor

@elaygl elaygl commented Oct 2, 2019

No description provided.

@elaygl elaygl requested a review from AleF83 October 3, 2019 05:47
@elaygl elaygl requested review from AleF83 and tomeresk October 6, 2019 13:18
services/authoring/src/repositories/policy-repository.ts Outdated Show resolved Hide resolved
: `manifests/${resource.path}/policy.json`;
};

export class PolicyRepository {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove the default from the class?
Seems most places that import this file use only the class, so it makes sense for it to be the default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like more this style of exporting because if we'd like to export something else in the future from this file you won't have to update all the other exports.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can export a default along with more things, but it is a bit clunky to call it

);
addOid(this.context.response, oid);

return 'OK';
Copy link
Contributor

Choose a reason for hiding this comment

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

Subjective, but I normally prefer not to include a response body if it does not add any information (aside from that the request succeeded, which is already indicated by the response status code).

If you don't return anything here, it will automatically return the 204 status code (which is for success without a request body)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm with you but in all the other routes it's returning OK so I followed.

@elaygl elaygl closed this Oct 8, 2020
@AleF83 AleF83 deleted the acl-parts branch October 30, 2022 07:34
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.

3 participants