Translate the Dimension integration types to go-neb types

This only applies to Travis CI and the RSS Bot.
This commit is contained in:
Travis Ralston 2018-03-24 22:02:40 -06:00
parent a5173fff85
commit dcda2fa46e

View File

@ -15,6 +15,13 @@ export class NebClient {
return user.accessToken;
}
private getNebType(type: string): string {
if (type === "rss") return "rssbot";
if (type === "travisci") return "travis-ci";
return type;
}
public async updateUser(userId: string, isEnabled: boolean, sync = true, autoAcceptInvites = true): Promise<any> {
const nebRequest: Client = {
UserID: userId,
@ -30,7 +37,7 @@ export class NebClient {
public async setServiceConfig(serviceId: string, userId: string, type: string, serviceConfig: any): Promise<any> {
const nebRequest: Service = {
ID: serviceId,
Type: type,
Type: this.getNebType(type),
UserID: userId,
Config: serviceConfig,
};