mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
Update routes to API v4
This commit is contained in:
@ -43,11 +43,11 @@ func apiIsCalledWith(endpoint string, data *gherkin.DocString) error {
|
||||
}
|
||||
|
||||
func messageIsSentWithAPICall(data *gherkin.DocString) error {
|
||||
endpoint := "POST /messages"
|
||||
endpoint := "POST /mail/v4/messages"
|
||||
if err := apiIsCalledWith(endpoint, data); err != nil {
|
||||
return err
|
||||
}
|
||||
for _, request := range ctx.GetPMAPIController().GetCalls("POST", "/messages") {
|
||||
for _, request := range ctx.GetPMAPIController().GetCalls("POST", "/mail/v4/messages") {
|
||||
if !checkAllRequiredFieldsForSendingMessage(request) {
|
||||
return fmt.Errorf("%s was not called with all required fields: %s", endpoint, request)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user