All: Fix invalid module error handling in API (#46)
parent
e013581a14
commit
9f00b8fe15
|
@ -36,8 +36,11 @@ export class ApiService {
|
|||
this.http.post('/api/module/request', payload).subscribe((r: any) => {
|
||||
if (r === undefined || r === null) {
|
||||
resp = this.emptyResponse;
|
||||
} else if (r.error) {
|
||||
resp = r;
|
||||
} else {
|
||||
resp = r.payload;
|
||||
}
|
||||
resp = r.payload;
|
||||
}, (err) => {
|
||||
resp = err.error;
|
||||
if (err.status === 401) {
|
||||
|
|
|
@ -36,8 +36,11 @@ export class ApiService {
|
|||
this.http.post('/api/module/request', payload).subscribe((r: any) => {
|
||||
if (r === undefined || r === null) {
|
||||
resp = this.emptyResponse;
|
||||
} else if (r.error) {
|
||||
resp = r;
|
||||
} else {
|
||||
resp = r.payload;
|
||||
}
|
||||
resp = r.payload;
|
||||
}, (err) => {
|
||||
resp = err.error;
|
||||
if (err.status === 401) {
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
"title": "Cabinet",
|
||||
"author": "newbi3",
|
||||
"description": "A simple browser based file manager for the WiFi Pineapple.",
|
||||
"version": "1.1",
|
||||
"version": "1.2",
|
||||
"firmware_required": "1.0.0"
|
||||
}
|
||||
|
|
|
@ -36,8 +36,11 @@ export class ApiService {
|
|||
this.http.post('/api/module/request', payload).subscribe((r: any) => {
|
||||
if (r === undefined || r === null) {
|
||||
resp = this.emptyResponse;
|
||||
} else if (r.error) {
|
||||
resp = r;
|
||||
} else {
|
||||
resp = r.payload;
|
||||
}
|
||||
resp = r.payload;
|
||||
}, (err) => {
|
||||
resp = err.error;
|
||||
if (err.status === 401) {
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
"title": "Evil Portal",
|
||||
"description": "An evil captive portal for the WiFi Pineapple.",
|
||||
"author": "newbi3",
|
||||
"version": "1.3",
|
||||
"version": "1.4",
|
||||
"firmware_required": "1.0.0"
|
||||
}
|
||||
|
|
|
@ -36,8 +36,11 @@ export class ApiService {
|
|||
this.http.post('/api/module/request', payload).subscribe((r: any) => {
|
||||
if (r === undefined || r === null) {
|
||||
resp = this.emptyResponse;
|
||||
} else if (r.error) {
|
||||
resp = r;
|
||||
} else {
|
||||
resp = r.payload;
|
||||
}
|
||||
resp = r.payload;
|
||||
}, (err) => {
|
||||
resp = err.error;
|
||||
if (err.status === 401) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "httpeek",
|
||||
"title": "HTTPeek",
|
||||
"description": "View plaintext HTTP traffic, such as cookies and images.",
|
||||
"version": "1.1",
|
||||
"author": "newbi3",
|
||||
"version": "1.2",
|
||||
"firmware_required": "1.0.0"
|
||||
}
|
||||
|
|
|
@ -36,8 +36,11 @@ export class ApiService {
|
|||
this.http.post('/api/module/request', payload).subscribe((r: any) => {
|
||||
if (r === undefined || r === null) {
|
||||
resp = this.emptyResponse;
|
||||
} else if (r.error) {
|
||||
resp = r;
|
||||
} else {
|
||||
resp = r.payload;
|
||||
}
|
||||
resp = r.payload;
|
||||
}, (err) => {
|
||||
resp = err.error;
|
||||
if (err.status === 401) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "mdk4",
|
||||
"title": "MDK4",
|
||||
"description": "Web GUI for the MDK4 wireless testing tool.",
|
||||
"version": "1.2",
|
||||
"author": "newbi3",
|
||||
"version": "1.3",
|
||||
"firmware_required": "1.0.0"
|
||||
}
|
||||
|
|
|
@ -36,8 +36,11 @@ export class ApiService {
|
|||
this.http.post('/api/module/request', payload).subscribe((r: any) => {
|
||||
if (r === undefined || r === null) {
|
||||
resp = this.emptyResponse;
|
||||
} else if (r.error) {
|
||||
resp = r;
|
||||
} else {
|
||||
resp = r.payload;
|
||||
}
|
||||
resp = r.payload;
|
||||
}, (err) => {
|
||||
resp = err.error;
|
||||
if (err.status === 401) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "nmap",
|
||||
"title": "Nmap",
|
||||
"description": "Web GUI for Nmap, the popular network mapping tool.",
|
||||
"version": "1.2",
|
||||
"author": "newbi3",
|
||||
"version": "1.3",
|
||||
"firmware_required": "1.0.0"
|
||||
}
|
||||
|
|
|
@ -36,8 +36,11 @@ export class ApiService {
|
|||
this.http.post('/api/module/request', payload).subscribe((r: any) => {
|
||||
if (r === undefined || r === null) {
|
||||
resp = this.emptyResponse;
|
||||
} else if (r.error) {
|
||||
resp = r;
|
||||
} else {
|
||||
resp = r.payload;
|
||||
}
|
||||
resp = r.payload;
|
||||
}, (err) => {
|
||||
resp = err.error;
|
||||
if (err.status === 401) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "tcpdump",
|
||||
"title": "TCPDump",
|
||||
"description": "Web GUI for the tcpdump packet analyzer tool.",
|
||||
"version": "1.2",
|
||||
"author": "newbi3",
|
||||
"version": "1.3",
|
||||
"firmware_required": "1.0.0"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue