Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public get = (sid: string): Promise => {
if (!isSidOfType(sid, SidPrefix.BuildSid)) {
throw new Error(`${sid} is not of type ${SidPrefix.BuildSid}`);
}
return this.http
.get(`${BuildClient.BaseUri}/${sid}`);
}
public create = (buildSid: string): Promise => {
if (!isSidOfType(buildSid, SidPrefix.BuildSid)) {
throw new Error(`${buildSid} is not of type ${SidPrefix.BuildSid}`);
}
return this.http
.post(DeploymentClient.BaseUri, {BuildSid: buildSid});
}
}
public create = (buildSid: string): Promise => {
if (!isSidOfType(buildSid, SidPrefix.BuildSid)) {
throw new Error(`${buildSid} is not of type ${SidPrefix.BuildSid}`);
}
return this.http
.post(DeploymentClient.BaseUri, {BuildSid: buildSid});
}
}
public get = (sid: string): Promise => {
if (!isSidOfType(sid, SidPrefix.BuildSid)) {
throw new Error(`${sid} is not of type ${SidPrefix.BuildSid}`);
}
return this.http
.get(`${BuildClient.BaseUri}/${sid}`);
}