mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Adjust api tests
This commit is contained in:
@@ -208,9 +208,10 @@ export function resetHabiticaDB() {
|
||||
}
|
||||
|
||||
function _requestMaker(user, method, additionalSets) {
|
||||
const API_V = process.env.API_VERSION || 'v2'
|
||||
return (route, send, query) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let request = superagent[method](`http://localhost:${API_TEST_SERVER_PORT}/api/v2${route}`)
|
||||
let request = superagent[method](`http://localhost:${API_TEST_SERVER_PORT}/api/${API_V}${route}`)
|
||||
.accept('application/json');
|
||||
|
||||
if (user && user._id && user.apiToken) {
|
||||
|
||||
Reference in New Issue
Block a user