We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2c96af commit f950b6bCopy full SHA for f950b6b
1 file changed
examples.js
@@ -22,17 +22,14 @@ async function examples() {
22
console.log(e);
23
}
24
25
- try {
26
- const listServersByConnection = await api.listServersByConnection({ connection_id: '1' });
27
- console.log(listServersByConnection);
28
- // {
29
- // success: true,
30
- // errors: [],
31
- // data: { Servers: { '1': 'test', '2': 'Minecraft Server' } }
32
- // }
33
- } catch (e) {
34
- console.log(e);
35
- }
+ api.listServersByConnection({ connection_id: '1' })
+ .then((data) => console.log(data))
+ .catch((err) => console.error(err));
+ // {
+ // success: true,
+ // errors: [],
+ // data: { Servers: { '1': 'test', '2': 'Minecraft Server' } }
+ // }
36
37
38
examples()
0 commit comments