Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .ci/doc/eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@
"block-spacing": ["error", "always"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": ["error", { "properties": "never" }],
"comma-dangle": [
"error",
{
"arrays": "never",
"objects": "never",
"imports": "never",
"exports": "never",
"functions": "never"
}
],
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-style": ["error", "last"],
"constructor-super": "error",
Expand Down
6 changes: 2 additions & 4 deletions .ci/doc/templates/default.tpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ const {
} = require('kuzzle-sdk');

// Instantiates a Kuzzle client
const
kuzzle = new Kuzzle(
new WebSocket('kuzzle', { autoReconnect: false })
);
const kuzzle = new Kuzzle(new WebSocket('kuzzle', { autoReconnect: false }));

// Adds a listener to detect any connection problems
kuzzle.on('networkError', error => {
Expand All @@ -21,6 +18,7 @@ kuzzle.on('networkError', error => {
} catch (error) {
console.log(`Can not connect to Kuzzle: ${error.message}`);
}

[snippet-code] finally {
kuzzle.disconnect();
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/test-docs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -ex

here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$here"
Expand Down
4 changes: 3 additions & 1 deletion .eslintrc-ts.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"plugin:@typescript-eslint/recommended"
],
"rules": {
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0
}
}
}
11 changes: 9 additions & 2 deletions doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
try {
await kuzzle.auth.login('local', { username: 'jane.doe', password: 'password' });
await kuzzle.auth.login('local', {
username: 'jane.doe',
password: 'password',
});

await kuzzle.auth.deleteApiKey('fQRa28BsidO6V_wmOcL');
const apiKey = await kuzzle.auth.createApiKey('Sigfox API key', {
refresh: 'wait_for'
});

await kuzzle.auth.deleteApiKey(apiKey._id);

console.log('API key successfully deleted');
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ hooks:
}
}
}' "kuzzle:7512/users/jane.doe/_create?refresh=wait_for"
&&
curl -XPOST -H "Content-type: application/json" -d '{
"description": "Sigfox API key"
}' "kuzzle:7512/users/jane.doe/api-keys/_create?_id=fQRa28BsidO6V_wmOcL&refresh=wait_for"
after:
curl -XDELETE kuzzle:7512/users/jane.doe
template: default
Expand Down
Loading