Update index.js
Browse files
index.js
CHANGED
@@ -171,7 +171,7 @@ app.post("/v1/revoked-key", async (req, res) => {
|
|
171 |
);
|
172 |
|
173 |
if (result.modifiedCount > 0) {
|
174 |
-
res.json({ message: "API key successfully revoked and regenerated", apiKey: newKey, createdAt:
|
175 |
} else {
|
176 |
res.status(500).json({ error: "Failed to update API key" });
|
177 |
}
|
|
|
171 |
);
|
172 |
|
173 |
if (result.modifiedCount > 0) {
|
174 |
+
res.json({ message: "API key successfully revoked and regenerated", apiKey: newKey, createdAt: new Date() });
|
175 |
} else {
|
176 |
res.status(500).json({ error: "Failed to update API key" });
|
177 |
}
|