Skip to content

Commit

Permalink
fixed acknowledge
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush-003 committed May 9, 2024
1 parent b13ab3c commit c0f9e85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 9 additions & 0 deletions dashboard/app/nodes/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'

const page = () => {
return (
<div>Node Health</div>
)
}

export default page
7 changes: 4 additions & 3 deletions middleware/rest_server/controllers/userController.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,15 @@ func PostRem(ctx context.Context, redisClient *store.RedisStore) gin.HandlerFunc
return
}


log.Println("Alert inserted successfully with ID:", result.InsertedID.(primitive.ObjectID).Hex())
alertMap["id"] = result.InsertedID.(primitive.ObjectID).Hex()

// publish the alert to the Redis stream
if err := redisClient.PublishData(ctx, alertMap, "alerts"); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to publish alert to Redis stream"})
}

log.Println("Alert inserted successfully with ID:", result.InsertedID.(primitive.ObjectID).Hex())
alertMap["id"] = result.InsertedID.(primitive.ObjectID).Hex()

// Add the alert ID to the user's Alerts array field

/*res, err := userCollection.update(
Expand Down

0 comments on commit c0f9e85

Please sign in to comment.