Skip to content

Commit

Permalink
chore: remove feature flag for GET /logs API
Browse files Browse the repository at this point in the history
  • Loading branch information
samarpan1738 committed Sep 20, 2024
1 parent 0d6d058 commit 1caeb6d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions controllers/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,13 @@ const fetchLogs = async (req, res) => {
const fetchAllLogs = async (req, res) => {
const { query } = req;
try {
if (query.dev !== "true") {
return res.boom.badRequest("Please use feature flag to make this request!");
}
const logs = await logsQuery.fetchAllLogs(query);
if (logs.length === 0) {
return res.status(204).send();
}
const { allLogs, next, prev, page } = logs;
if (page) {
const pageLink = `/logs?page=${page}&dev=${query.dev}`;
const pageLink = `/logs?page=${page}`;
return res.status(200).json({
message: ALL_LOGS_FETCHED_SUCCESSFULLY,
data: allLogs,
Expand Down

0 comments on commit 1caeb6d

Please sign in to comment.