domain blocking more work

This commit is contained in:
tsmethurst 2021-06-30 12:02:28 +02:00
commit 99eb3bf564
11 changed files with 160 additions and 58 deletions

View file

@ -1,6 +1,7 @@
package admin
import (
"errors"
"fmt"
"net/http"
@ -59,6 +60,10 @@ func (m *Module) DomainBlocksPOSTHandler(c *gin.Context) {
}
func validateCreateDomainBlock(form *model.DomainBlockCreateRequest) error {
// TODO: add some validation here later if necessary
// add some more validation here later if necessary
if form.Domain == "" {
return errors.New("empty domain provided")
}
return nil
}