Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changed state and type
  • Loading branch information
Evan Langlais committed Apr 10, 2019
1 parent c2f31dc commit 73d6f3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/generator-object.ts
Expand Up @@ -11,7 +11,7 @@ export interface GeneratorState {
status: string;
status_code: number;
fault_count: number | null;
fault_codes: Array<number> | null;
fault_codes: Array<string> | null;
ip: string;
}

4 changes: 2 additions & 2 deletions src/app/services/generator.service.ts
Expand Up @@ -19,7 +19,7 @@ export class GeneratorService {
}).subscribe(async (raw_generators: Array<GeneratorObject>) => {
const generators: Array<GeneratorObject> = [];
for (const generator of raw_generators) {
await this.getGeneratorStatus(generator.gen_id, token).then((state: GeneratorState) => {
await this.getGeneratorState(generator.gen_id, token).then((state: GeneratorState) => {
generator.state = state;
generators.push(generator);
}, (error) => {
Expand All @@ -33,7 +33,7 @@ export class GeneratorService {
});
}

getGeneratorStatus(gen_id: number, token: string): Promise<GeneratorState> {
getGeneratorState(gen_id: number, token: string): Promise<GeneratorState> {
return new Promise<GeneratorState>((resolve, reject) => {
this.http.get('http://sd5-backend.engr.uconn.edu/generator/' + gen_id + '/status', {
headers: {
Expand Down

0 comments on commit 73d6f3d

Please sign in to comment.