Skip to content

Commit

Permalink
Fixed typo in the main function
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrea committed Jan 4, 2024
1 parent 22702ea commit f3bf674
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/controllers/v4/textUtilities/owoify.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Stats from '../../../models/schemas/Stat.js';
* @param {Object} res - Express response object.
* @param {Function} next - Express next middleware function.
*/
const getOwofiyText = async (req, res, next) => {
const getOwoifyText = async (req, res, next) => {
try {
const { text } = req.query;

Expand All @@ -24,18 +24,12 @@ const getOwofiyText = async (req, res, next) => {
});

// Update system statistics for Owofied texts
await Stats.findOneAndUpdate(
{ _id: 'systemstats' },
{ $inc: { owoify: 1 } }
);
await Stats.findOneAndUpdate({ _id: 'systemstats' }, { $inc: { owoify: 1 } });
} catch (error) {
// Update system statistics for failed requests
await Stats.findOneAndUpdate(
{ _id: 'systemstats' },
{ $inc: { failed_requests: 1 } }
);
await Stats.findOneAndUpdate({ _id: 'systemstats' }, { $inc: { failed_requests: 1 } });
return next(error);
}
};

export default getOwofiyText;
export default getOwoifyText;

0 comments on commit f3bf674

Please sign in to comment.