(c fiber.Ctx, owner string, authCtx entities.AuthContext)
| 39 | } |
| 40 | |
| 41 | func (h *handler) responsePhoneAPIKeyUnauthorized(c fiber.Ctx, owner string, authCtx entities.AuthContext) error { |
| 42 | return c.Status(fiber.StatusUnauthorized).JSON(fiber.Map{ |
| 43 | "status": "error", |
| 44 | "message": "You are not authorized to carry out the request for this phone number", |
| 45 | "data": fmt.Sprintf("The phone API key is does not have permission to carry out actions on the phone number [%s]. The API key is only configured for these phone numbers [%s]", owner, strings.Join(authCtx.PhoneNumbers, ",")), |
| 46 | }) |
| 47 | } |
| 48 | |
| 49 | func (h *handler) responseForbidden(c fiber.Ctx) error { |
| 50 | return c.Status(fiber.StatusForbidden).JSON(fiber.Map{ |
no outgoing calls
no test coverage detected