fix: brand api

This commit is contained in:
2025-10-26 18:26:22 +07:00
parent 2fa263e9e4
commit 409e2d3750
6 changed files with 83 additions and 112 deletions

View File

@@ -52,22 +52,9 @@ const deleteSolutionDb = async (solutionId, deletedBy) => {
return true;
};
// Get solution by ID
const getSolutionByIdDb = async (solutionId) => {
const queryText = `
SELECT
a.*
FROM brand_code_solution a
WHERE a.brand_code_solution_id = $1 AND a.deleted_at IS NULL
`;
const result = await pool.query(queryText, [solutionId]);
return result.recordset[0];
};
module.exports = {
getSolutionsByErrorCodeIdDb,
createSolutionDb,
updateSolutionDb,
deleteSolutionDb,
getSolutionByIdDb,
};