Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ankurdotio/testdog
/ functions
Functions
120 in github.com/ankurdotio/testdog
⨍
Functions
120
◇
Types & classes
28
Method
getPaymentMethodStats
(dateFilter = {})
src/dao/payment.dao.js:303
Method
getPaymentStats
(dateFilter = {})
src/dao/payment.dao.js:229
Method
getPaymentsByStatus
(status, options = {})
src/dao/payment.dao.js:192
Method
getRandomProduct
* Get random product * @returns {Promise<Object>} - Random product
src/services/product.service.js:244
Method
getRandomUser
* Get a random user from the database. * @returns {Promise<Object|null>} - Random user or null if no users exist
src/services/user.service.js:254
Function
gracefulShutdown
()
server.js:38
Method
hardDelete
(paymentId)
src/dao/payment.dao.js:380
Method
hgetall
* Get all fields and values in a hash * @param {string} key - Hash key * @returns {Promise<Object|null>} - Promise resolving to an object with a
src/config/redis.js:250
Method
hmset
* Set multiple hash fields to multiple values * @param {string} key - Hash key * @param {Object} fields - Object containing field-value pairs
src/config/redis.js:228
Method
incr
* Increment a key's value * @param {string} key - Key to increment * @returns {Promise<number|null>} - Promise resolving to the new value
src/config/redis.js:213
Method
lrange
* Get a range of elements from a list * @param {string} key - List key * @param {number} start - Start index * @param {number} stop - Stop in
src/config/redis.js:284
Function
protect
(req, res, next)
src/middlewares/auth.middleware.js:11
Method
removeCartItem
* Remove item from cart * @param {string} userId - User ID * @param {string} itemId - Cart item ID * @returns {Promise<Object>} - Updated car
src/services/cart.service.js:192
Method
resetPassword
* Reset user password (after validating token externally). * @param {string} userId * @param {string} newPassword * @returns {Promise<Object>
src/services/user.service.js:112
Method
rpush
* Push a value to the end of a list * @param {string} key - List key * @param {any} value - Value to push * @returns {Promise<number|null>} -
src/config/redis.js:265
Function
updateExchangeRates
(newRates)
src/utils/currencyUtils.js:102
Method
updateProductById
* Update a product by ID. * @param {string} productId - MongoDB product ID. * @param {Object} updateData - Fields to update. * @returns {Prom
src/dao/product.dao.js:47
Method
updateUserById
* Update user fields by ID. * @param {string} userId - MongoDB user ID. * @param {Object} updateData - Fields to update. * @returns {Promise<
src/dao/user.dao.js:70
Function
validate
(validations)
src/middlewares/validator.middleware.js:9
Function
validateObjectId
(idField = 'id')
src/validators/common.validator.js:16
← previous
101–120 of 120, ranked by callers