Skip to content

Commit

Permalink
build: generator updates and new coverage approach (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored Apr 27, 2020
1 parent 437958d commit eb25adf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion game-servers/snippets/list_realms.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function main(projectId = 'YOUR_PROJECT_ID', location = 'LOCATION_ID') {
};

const [results] = await client.listRealms(request);
for (const realm of results.realms) {
for (const realm of results) {
console.log(`Realm name: ${realm.name}`);
console.log(`Realm description: ${realm.description}`);
console.log(`Realm time zone: ${realm.timeZone}`);
Expand Down
2 changes: 1 addition & 1 deletion game-servers/snippets/test/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = async () => {
const NOW = new Date();

const [results] = await realmsClient.listRealms(request);
for (const realm of results.realms) {
for (const realm of results) {
// Check age of realm. If older than maximum life span, delete.
const ageOfRealm = new Date(realm.createTime.seconds * 1000);
if (NOW - ageOfRealm > MAX_REALM_LIFESPAN) {
Expand Down

0 comments on commit eb25adf

Please sign in to comment.