Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion cloud-sql/mysql/mysql/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ app.post('/', async (req, res) => {

res
.status(200)
.send('Successfully voted for ' + team + ' at ' + timestamp)
.send(`Successfully voted for ${team} at ${timestamp}`)
.end();
});

Expand Down
2 changes: 1 addition & 1 deletion cloud-sql/postgres/knex/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ app.post('/', async (req, res) => {
try {
await insertVote(knex, vote);
} catch (err) {
logger.error('Error while attempting to submit vote:' + err);
logger.error(`Error while attempting to submit vote:${err}`);
res
.status(500)
.send('Unable to cast vote; see logs for more details.')
Expand Down
2 changes: 1 addition & 1 deletion functions/billing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const _stopInstances = async (projectId, zone, instanceNames) => {
instance: instanceName,
})
.then(res => {
console.log('Instance stopped successfully: ' + instanceName);
console.log(`Instance stopped successfully: ${instanceName}`);
return res.data;
});
})
Expand Down
4 changes: 2 additions & 2 deletions functions/scheduleinstance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ exports.startInstancePubSub = (event, context, callback) => {
})
.then(() => {
// Operation complete. Instance successfully started.
const message = 'Successfully started instance ' + instance.name;
const message = `Successfully started instance ${instance.name}`;
console.log(message);
callback(null, message);
})
Expand Down Expand Up @@ -101,7 +101,7 @@ exports.stopInstancePubSub = (event, context, callback) => {
})
.then(() => {
// Operation complete. Instance successfully stopped.
const message = 'Successfully stopped instance ' + instance.name;
const message = `Successfully stopped instance ${instance.name}`;
console.log(message);
callback(null, message);
})
Expand Down
5 changes: 2 additions & 3 deletions functions/tokenservice/functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ function generateAccessToken(
method: 'POST',
headers: {
// Set Service Account Credentials
Authorization:
serviceAccountTokenType + ' ' + serviceAccountAccessToken,
Authorization: `${serviceAccountTokenType} ${serviceAccountAccessToken}`,
},
};

Expand Down Expand Up @@ -120,7 +119,7 @@ function retrieveCredentials(context) {
});
get_req.on('error', e => {
//console.log('Error retrieving credentials', e.message);
return 'Error retrieving token' + e.message;
return `Error retrieving token: ${e.message}`;
});
get_req.end();
});
Expand Down
4 changes: 2 additions & 2 deletions iot/http_example/cloudiot_http_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function publishAsync(authToken, messageCount, numMessages) {
if (error) {
console.error('Received error: ', error);
} else if (response.body.error) {
console.error('Received error: ' + JSON.stringify(response.body.error));
console.error(`Received error: ${JSON.stringify(response.body.error)}`);
} else {
console.log('Message sent.');
}
Expand Down Expand Up @@ -205,7 +205,7 @@ function getConfig(authToken, version) {
console.log(`Getting config from URL: ${urlBase}`);

const options = {
url: urlBase + '/config?local_version=' + version,
url: `${urlBase}/config?local_version=${version}`,
headers: {
authorization: `Bearer ${authToken}`,
'content-type': 'application/json',
Expand Down