photoprism/internal/form/connect.go
Michael Mayer 0852e659c2 API: Improve logs and add /api/v1/connect endpoint for auth callbacks
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-07-19 16:58:43 +02:00

15 lines
314 B
Go

package form
import (
"github.com/photoprism/photoprism/pkg/rnd"
)
// Connect represents a connection request with an external service.
type Connect struct {
Token string `json:"Token"`
}
// Invalid tests if the form data is invalid.
func (f Connect) Invalid() bool {
return !rnd.ValidateCrcToken(f.Token)
}