Skip to content

GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.

393 B
Raw Blame
package utils

import (
	"github.com/gofiber/fiber/v3"
)

type ResponseData struct {
	Status  int    `json:"-"`
	Code    string `json:"code"`
	Message string `json:"message"`
	Results any    `json:"results,omitempty"`
}

func ResponseError(c fiber.Ctx, message string) error {
	return c.Status(fiber.StatusBadRequest).JSON(ResponseData{
		Code:    "INVALID_REQUEST",
		Message: message,
	})
}