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

fix: get remaja by posyandu #58

Merged
merged 1 commit into from
Feb 2, 2024
Merged

fix: get remaja by posyandu #58

merged 1 commit into from
Feb 2, 2024

Conversation

fathoor
Copy link
Owner

@fathoor fathoor commented Feb 2, 2024

Fix

Resolve #57

{
    "code": 200,
    "status": "OK",
    "data": [
        <hidden>
    ]
}

Reason

Similar to #55 which was fixed on PR #56 , separated endpoint middleware

remaja := app.Group("/v1/remaja")
remaja.Post("/", middleware.Authenticate("bidan"), controller.Create)
remaja.Get("/", middleware.Authenticate("bidan"), controller.GetAll)
remaja.Get("/posyandu/:id", middleware.Authenticate("public"), controller.GetByPosyanduID)
remaja.Get("/:id", middleware.Authenticate("bidan"), controller.GetByID)
remaja.Put("/:id", middleware.Authenticate("bidan"), controller.UpdateKader)
remaja.Delete("/:id", middleware.Authenticate("bidan"), controller.Delete)

@fathoor fathoor added the fix Fixes existing bug label Feb 2, 2024
@fathoor fathoor self-assigned this Feb 2, 2024
@fathoor fathoor merged commit 1d46a08 into fathoor:main Feb 2, 2024
@fathoor fathoor deleted the fix/57 branch February 2, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fixes existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] get all remaja by posyandu restricted from kader & remaja
1 participant