Some postman import improvements

This commit is contained in:
Gregory Schier
2023-11-11 10:43:11 -08:00
parent 8381104302
commit b519bff3d6
9 changed files with 464 additions and 145 deletions
@@ -1,15 +0,0 @@
/**
* Import an Insomnia workspace object.
* @param {Object} w - The workspace object to import.
*/
export function importWorkspace(w, variables) {
console.log('IMPORTING Workspace', w._id, w.name, JSON.stringify(w, null, 2));
return {
id: w._id,
createdAt: new Date(w.created ?? Date.now()).toISOString().replace('Z', ''),
updatedAt: new Date(w.updated ?? Date.now()).toISOString().replace('Z', ''),
model: 'workspace',
name: w.name,
variables,
};
}