httpsms-gateway / api /pkg /requests /user_notification_update_request.go
ML Intern deploy
Deploy httpSMS gateway to Hugging Face Spaces (Docker SDK): nginx :7860 -> Go API :8000, Nuxt SPA, Android APK, bootstrap-mode entrypoint
83a59ca
Raw History Blame
935 Bytes
package requests
import (
"github.com/NdoleStudio/httpsms/pkg/services"
)
// UserNotificationUpdate is the payload for updating a phone
type UserNotificationUpdate struct {
request
MessageStatusEnabled bool `json:"message_status_enabled" example:"true"`
WebhookEnabled bool `json:"webhook_enabled" example:"true"`
HeartbeatEnabled bool `json:"heartbeat_enabled" example:"true"`
NewsletterEnabled bool `json:"newsletter_enabled" example:"true"`
}
// ToUserNotificationUpdateParams converts UserNotificationUpdate to services.UserNotificationUpdateParams
func (input *UserNotificationUpdate) ToUserNotificationUpdateParams() *services.UserNotificationUpdateParams {
return &services.UserNotificationUpdateParams{
MessageStatusEnabled: input.MessageStatusEnabled,
WebhookEnabled: input.WebhookEnabled,
HeartbeatEnabled: input.HeartbeatEnabled,
NewsletterEnabled: input.NewsletterEnabled,
}
}