Skip to content

Commit

Permalink
Add types and linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb committed Oct 17, 2023
1 parent afe636b commit 4cbd68f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default class Cloud {
return await response.json();
}

async renameRole(roleId, name) {
async renameRole(roleId, name: string) {
const body = {
name,
clientId: this.clientId,
Expand All @@ -207,7 +207,7 @@ export default class Cloud {
//return await response.json();
}

async renameProject(name) {
async renameProject(name: string) {
const body = {
name,
clientId: this.clientId,
Expand Down Expand Up @@ -305,7 +305,7 @@ export default class Cloud {
return project;
}

async getProjectByName(owner, name) {
async getProjectByName(owner: string, name: string) {
const response = await this.fetch(
`/projects/user/${encodeURIComponent(owner)}/${encodeURIComponent(name)}`,
);
Expand Down Expand Up @@ -704,7 +704,7 @@ class RequestError extends Error {

static async from(response: Response): Promise<RequestError> {
const message = await response.text() || response.statusText ||
'An unknown error occurred. Please try again later.';
"An unknown error occurred. Please try again later.";
const error = new RequestError(message);
error.status = response.status;
return error;
Expand Down

0 comments on commit 4cbd68f

Please sign in to comment.