mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-28 04:11:16 +01:00
16 lines
484 B
JavaScript
16 lines
484 B
JavaScript
/**
|
|
* 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,
|
|
};
|
|
}
|