We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f813f3c commit b5404ddCopy full SHA for b5404dd
components/neon_api_keys/neon_api_keys.app.mjs
@@ -52,6 +52,35 @@ export default {
52
},
53
methods: {
54
...postgresql.methods,
55
+ _hasDbCredentials() {
56
+ return this.$auth.host
57
+ && this.$auth.port
58
+ && this.$auth.user
59
+ && this.$auth.password
60
+ && this.$auth.database;
61
+ },
62
+ getClientConfiguration() {
63
+ if (!this._hasDbCredentials()) {
64
+ throw new Error("No database credentials found");
65
+ }
66
+
67
+ const {
68
+ host,
69
+ port,
70
+ user,
71
+ password,
72
+ database,
73
+ } = this.$auth;
74
75
+ return {
76
77
78
79
80
81
+ ssl: this._getSslConfig(),
82
+ };
83
84
_apiKey() {
85
return this.$auth.api_key;
86
0 commit comments