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

Services shouldn't return HttpResponse #7

Closed
nminaya opened this issue Nov 27, 2020 · 1 comment · Fixed by #13
Closed

Services shouldn't return HttpResponse #7

nminaya opened this issue Nov 27, 2020 · 1 comment · Fixed by #13
Assignees

Comments

@nminaya
Copy link
Collaborator

nminaya commented Nov 27, 2020

Services shouldn't return HttpResponses

https://github.com/Jadhielv/KCTest/blob/4b2d6219d03bd910d430fe54cffe5524caa2784b/Backend/src/KCTest.Domain/Services/IPermissionService.cs#L9

HttpResponses should be handled in the controller.

@Jadhielv Jadhielv self-assigned this Nov 27, 2020
@Morzkat
Copy link
Contributor

Morzkat commented Dec 1, 2020

Should return a model like:

public class Response<T>
{
    string Message { get; set; }
    public int StatusCode { get; set; }
    public T Data { get; set; }
}

@Jadhielv Jadhielv assigned Morzkat and unassigned Jadhielv Dec 1, 2020
@Jadhielv Jadhielv linked a pull request Dec 3, 2020 that will close this issue
@Jadhielv Jadhielv closed this as completed Dec 4, 2020
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 a pull request may close this issue.

3 participants