Skip to content

Conversation

@tailorsmit
Copy link

to order a single item we need a user id so i added a another api that returns the user id

return new ResponseEntity<StripeResponse>(stripeResponse, HttpStatus.OK);
}

@PostMapping("/single-checkout")
Copy link
Contributor

Choose a reason for hiding this comment

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

rename it checkout-single-product

public ResponseEntity<StripeResponse> singleitemcheckout(@RequestBody CheckoutItemDto checkoutItemDto, @RequestParam String token) throws StripeException {

try {
int id = authenticationService.getUser(token).getId();
Copy link
Contributor

Choose a reason for hiding this comment

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

throe Authentication exception in method instead of try catch

public SignInResponseDto Signup(@RequestBody SignInDto signInDto) throws CustomException {
return userService.signIn(signInDto);
}
@GetMapping("/getuserid")
Copy link
Contributor

Choose a reason for hiding this comment

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

do you still need it?

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