Skip to content

Commit 711fbb2

Browse files
committed
Update ElasticSearch when toggling mapset explicit
1 parent 07d60d7 commit 711fbb2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

handlers/mapsets.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ func MarkMapsetAsExplicit(c *gin.Context) *APIError {
272272
return APIErrorServerError("Error setting mapset as explicit", err)
273273
}
274274

275+
if err := db.UpdateElasticSearchMapset(*mapset); err != nil {
276+
return APIErrorServerError("Error updating elastic search mapset (mark as explicit)", err)
277+
}
278+
275279
c.JSON(http.StatusOK, gin.H{"message": "You have successfully marked that mapset as explicit."})
276280
return nil
277281
}
@@ -309,6 +313,10 @@ func MarkMapsetAsNotExplicit(c *gin.Context) *APIError {
309313
return APIErrorServerError("Error setting mapset as explicit", err)
310314
}
311315

316+
if err := db.UpdateElasticSearchMapset(*mapset); err != nil {
317+
return APIErrorServerError("Error updating elastic search mapset (mark as not explicit)", err)
318+
}
319+
312320
c.JSON(http.StatusOK, gin.H{"message": "You have successfully marked that mapset as clean."})
313321
return nil
314322
}

0 commit comments

Comments
 (0)