Skip to content

Commit dd8eefa

Browse files
committed
Code cleanup
1 parent 2a65428 commit dd8eefa

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

templates/cli/lib/config.js.twig

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,6 @@ class Local extends Config {
134134
return this.get("collections");
135135
}
136136

137-
getDatabases() {
138-
if (!this.has("databases")) {
139-
return [];
140-
}
141-
return this.get("databases");
142-
}
143-
144137
getCollection($id) {
145138
if (!this.has("collections")) {
146139
return {};
@@ -156,21 +149,6 @@ class Local extends Config {
156149
return {};
157150
}
158151

159-
getDatabase($id) {
160-
if (!this.has("databases")) {
161-
return {};
162-
}
163-
164-
let databases = this.get("databases");
165-
for (let i = 0; i < databases.length; i++) {
166-
if (databases[i]['$id'] == $id) {
167-
return databases[i];
168-
}
169-
}
170-
171-
return {};
172-
}
173-
174152
addCollection(props) {
175153
if (!this.has("collections")) {
176154
this.set("collections", []);
@@ -188,6 +166,28 @@ class Local extends Config {
188166
this.set("collections", collections);
189167
}
190168

169+
getDatabases() {
170+
if (!this.has("databases")) {
171+
return [];
172+
}
173+
return this.get("databases");
174+
}
175+
176+
getDatabase($id) {
177+
if (!this.has("databases")) {
178+
return {};
179+
}
180+
181+
let databases = this.get("databases");
182+
for (let i = 0; i < databases.length; i++) {
183+
if (databases[i]['$id'] == $id) {
184+
return databases[i];
185+
}
186+
}
187+
188+
return {};
189+
}
190+
191191
addDatabase(props) {
192192
if (!this.has("databases")) {
193193
this.set("databases", []);

0 commit comments

Comments
 (0)