wisdom #2

Merged
yogiedigital merged 126 commits from wisdom into main 2025-10-20 03:26:33 +00:00
Showing only changes of commit b022e86e02 - Show all commits

View File

@@ -1,12 +1,12 @@
const setResponse = async (data = [], message = "success", statusCode = 200) => {
const response = {
const setResponse = (data = null, message = "success", statusCode = 200) => {
const total = Array.isArray(data) ? data.length : null;
return {
data,
total: data.length,
total,
message,
statusCode
}
return response
};
};
const setResponsePaging = async (data = [], total, limit, page, message = "success", statusCode = 200) => {