Skip to content

Instantly share code, notes, and snippets.

@develohpanda
Last active August 9, 2021 01:24
Show Gist options
  • Save develohpanda/610fd03139f0339353658283be49cf8b to your computer and use it in GitHub Desktop.
Save develohpanda/610fd03139f0339353658283be49cf8b to your computer and use it in GitHub Desktop.
Insomnia Designer scripts
function configureRepository(token) {
const set = (elName, value) => {
document.getElementsByName(elName)[0].value = value;
};
set('uri', 'https://github.com/develohpanda/designer.git');
set('authorName', 'gh-sync');
set('authorEmail', '[email protected]');
set('username', 'gh-sync-test');
set('token', token);
}
await (async t => (await models[t].all()).forEach(models[t].remove))('request')
async function moveWorkspaceToSpace(workspaceId, spaceId) {
const workspace = await models.workspace.getById(workspaceId);
if (workspace) {
await models.workspace.update(workspace, { parentId: spaceId });
}
}
function resetToOnboarding() {
localStorage['insomnia::meta::activity'] = null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment