mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 09:18:30 +02:00
15 lines
457 B
JavaScript
15 lines
457 B
JavaScript
/**
|
|
* Import an Insomnia workspace object.
|
|
* @param {Object} w - The workspace object to import.
|
|
*/
|
|
export function importWorkspace(w) {
|
|
console.log('IMPORTING Workpace', 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,
|
|
};
|
|
}
|