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

Gear/joh 47 add islike in find pet #19

Closed
wants to merge 17 commits into from

Conversation

macgeargear
Copy link
Contributor

Change made

  •  Bug fixes
  •  New features
  •  Breaking changes

Describe what you have done

  • modify pet handler to return IsLike when there're bearer token in header

  • manual test for calling rest api

  1. /auth/signup [POST]
  2. /auth/signin [POST]
  3. /likes/ [POST]
  4. /likes/:id [GET]
  5. /like/:id [DELETE]

New Features

  • pet response will return IsLike

Fix

  • pet handler

Others

  1. /auth/signup [POST]
Screenshot 2024-01-09 at 15 55 47
  1. /auth/signin [POST]
Screenshot 2024-01-09 at 15 56 35
  1. /like/create [POST]
Screenshot 2024-01-09 at 15 57 53
  1. /likes/:id [GET]
Screenshot 2024-01-09 at 15 59 08
  1. /like/:id [DELETE]
Screenshot 2024-01-09 at 16 00 09

Copy link

linear bot commented Jan 9, 2024

src/app/dto/pet.dto.go Outdated Show resolved Hide resolved
@macgeargear
Copy link
Contributor Author

macgeargear commented Jan 9, 2024

Describe what you have done

  • Bug fixes

Fix

  • [GET] /pets/ /pets/:id will skip auth middleware if user is not authenticated (not have token) and all IsLike of each pet will be false
  • change pet dto from *bool to bool
  • pet handler test

Others

  • find like by user id
Screenshot 2024-01-09 at 23 36 21
  • find all pets with bearer token should return pet with isLike == true
Screenshot 2024-01-09 at 23 38 47

@bookpanda
Copy link
Contributor

I'm sorry but please wait a little while as I have already fixed the middleware for every case in my user endpoints PR. Almost done!

@bookpanda
Copy link
Contributor

Due to decicion that there will be no Like in backend (as User login/register is removed for normal users), I will close the PR. If it is in need again, we can open it.

@bookpanda bookpanda closed this Jan 10, 2024
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