Last active
August 9, 2021 01:24
-
-
Save develohpanda/610fd03139f0339353658283be49cf8b to your computer and use it in GitHub Desktop.
Insomnia Designer scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await (async t => (await models[t].all()).forEach(models[t].remove))('request') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function moveWorkspaceToSpace(workspaceId, spaceId) { | |
const workspace = await models.workspace.getById(workspaceId); | |
if (workspace) { | |
await models.workspace.update(workspace, { parentId: spaceId }); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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