From 3ed1ca68e52527f74103e1a57ae48ae533508c3a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:55:17 +0200 Subject: [feature] Store admin actions in the db, prevent conflicting actions (#2167) --- internal/api/client/admin/domainblockcreate.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'internal/api/client/admin/domainblockcreate.go') diff --git a/internal/api/client/admin/domainblockcreate.go b/internal/api/client/admin/domainblockcreate.go index 148fad7c9..5cf9ea279 100644 --- a/internal/api/client/admin/domainblockcreate.go +++ b/internal/api/client/admin/domainblockcreate.go @@ -119,6 +119,11 @@ import ( // description: not found // '406': // description: not acceptable +// '409': +// description: >- +// Conflict: There is already an admin action running that conflicts with this action. +// Check the error message in the response body for more information. This is a temporary +// error; it should be possible to process this action if you try again in a bit. // '500': // description: internal server error func (m *Module) DomainBlocksPOSTHandler(c *gin.Context) { @@ -159,7 +164,7 @@ func (m *Module) DomainBlocksPOSTHandler(c *gin.Context) { if !importing { // Single domain block creation. - domainBlock, errWithCode := m.processor.Admin().DomainBlockCreate( + domainBlock, _, errWithCode := m.processor.Admin().DomainBlockCreate( c.Request.Context(), authed.Account, form.Domain, -- cgit v1.2.3