Closed ew00github closed 11 months ago
I see what's going on here. Instead of adding these endpoints let's just add one endpoint that returns an HttpStatus object by id. Then in the email service you can send a single request to that endpoint. Currently it looks like you're making two separate requests; one for the status, and one for the image. This isn't a great way to do things since sometimes we have objects that have hundreds of fields and we'd have to explicitly call a service hundreds of times to get all the information. Or we can set up an endpoint that returns the object and make a single request.
You'll likely need a similar HttpStatus object in your HTTPCatCloneEmailer project. Then you'll need to do something similar to this:
HttpStatus status = webClient.get("urlForIdRequest");
That's just random syntax and not how webClient works, but it's just a general example of what you should try to do
What does this PR do? I see you added scheduling and email dependencies, but I'm not seeing them in use
That's my bad, I originally implemented the mail functionality within this program but I forgot to remove it when I transferred it to the HTTPCatCloneEmailer. I'll remove them with the next commit
I see what's going on here. Instead of adding these endpoints let's just add one endpoint that returns an HttpStatus object by id. Then in the email service you can send a single request to that endpoint. Currently it looks like you're making two separate requests; one for the status, and one for the image. This isn't a great way to do things since sometimes we have objects that have hundreds of fields and we'd have to explicitly call a service hundreds of times to get all the information. Or we can set up an endpoint that returns the object and make a single request.
You'll likely need a similar HttpStatus object in your HTTPCatCloneEmailer project. Then you'll need to do something similar to this:
HttpStatus status = webClient.get("urlForIdRequest");
That's just random syntax and not how webClient works, but it's just a general example of what you should try to do
That makes sense, I'll reformat things and get back to you as soon as it's done
What does this PR do? I see you added scheduling and email dependencies, but I'm not seeing them in use