feat: Authors feature backend (and upgraded deprecated mods)
This commit is contained in:
1 parent
a11338094e
commit
b34a173d83
103 files changed
+6454
-240
No files matched your search
@@ -3,6 +3,7 @@ package useCases
|
||||
import (
|
||||
"RenewCMS/internal/domain/article"
|
||||
"RenewCMS/internal/domain/audit"
|
||||
"RenewCMS/internal/domain/author"
|
||||
"RenewCMS/internal/domain/image"
|
||||
"RenewCMS/internal/domain/invite"
|
||||
"RenewCMS/internal/domain/purge"
|
||||
@@ -64,6 +65,12 @@ var failureReasons = []failureReason{
|
||||
{site.ErrInvalidLocale, "The locale is not valid."},
|
||||
{site.ErrUseSetDefault, "Use the default site action to change the default."},
|
||||
{site.ErrInvalidReassign, "The destination site is not valid."},
|
||||
{author.ErrSlugTaken, "That slug is already used by another author."},
|
||||
{author.ErrUserAlreadyLinked, "That user already has an author."},
|
||||
{author.ErrAuthorAlreadyLinked, "That author is already linked to a user."},
|
||||
{author.ErrAuthorRights, "Only an owner or admin can change this author."},
|
||||
{author.ErrAuthorHasArticles, "The author is still credited on articles."},
|
||||
{author.ErrInvalidReassign, "The destination author is not valid."},
|
||||
}
|
||||
|
||||
var restartFailureReasons = []failureReason{
|
||||
@@ -82,6 +89,11 @@ var notFoundCauses = []error{
|
||||
invite.ErrInviteNotFound,
|
||||
user.ErrUserNotFound,
|
||||
site.ErrSiteNotFound,
|
||||
author.ErrAuthorNotFound,
|
||||
author.ErrBioTooLong,
|
||||
author.ErrInvalidURL,
|
||||
author.ErrTooManyLinks,
|
||||
author.ErrInvalidSlug,
|
||||
}
|
||||
|
||||
func reasonFor(err error, overrides ...failureReason) string {
|
||||
|
||||
Reference in new issue
Block a user