adds password reset
This commit is contained in:
@@ -38,7 +38,7 @@ func documentFromTrailRecord(r *models.Record, includeShares bool) map[string]in
|
||||
return document
|
||||
}
|
||||
|
||||
func IndexTrail(r *models.Record, client *meilisearch.Client) error {
|
||||
func IndexTrail(r *models.Record, client meilisearch.ServiceManager) error {
|
||||
documents := []map[string]interface{}{documentFromTrailRecord(r, true)}
|
||||
|
||||
if _, err := client.Index("trails").AddDocuments(documents); err != nil {
|
||||
@@ -48,7 +48,7 @@ func IndexTrail(r *models.Record, client *meilisearch.Client) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func UpdateTrail(r *models.Record, client *meilisearch.Client) error {
|
||||
func UpdateTrail(r *models.Record, client meilisearch.ServiceManager) error {
|
||||
documents := documentFromTrailRecord(r, false)
|
||||
|
||||
if _, err := client.Index("trails").UpdateDocuments(documents); err != nil {
|
||||
@@ -58,7 +58,7 @@ func UpdateTrail(r *models.Record, client *meilisearch.Client) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func UpdateTrailShares(trailId string, shares []string, client *meilisearch.Client) error {
|
||||
func UpdateTrailShares(trailId string, shares []string, client meilisearch.ServiceManager) error {
|
||||
documents := []map[string]interface{}{
|
||||
{
|
||||
"id": trailId,
|
||||
@@ -71,7 +71,7 @@ func UpdateTrailShares(trailId string, shares []string, client *meilisearch.Clie
|
||||
return nil
|
||||
}
|
||||
|
||||
func GenerateMeilisearchToken(rules map[string]interface{}, client *meilisearch.Client) (resp string, err error) {
|
||||
func GenerateMeilisearchToken(rules map[string]interface{}, client meilisearch.ServiceManager) (resp string, err error) {
|
||||
apiKeyUid := ""
|
||||
apiKey := ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user