diff --git a/src/browser/pages/login.html b/src/browser/pages/login.html
index b9a8bd6d..df6c890b 100644
--- a/src/browser/pages/login.html
+++ b/src/browser/pages/login.html
@@ -33,12 +33,9 @@
-
{
+ public async getRoot(route: Route, error?: Error): Promise
{
const response = await this.getUtf8Resource(this.rootPath, "src/browser/pages/login.html")
- response.content = response.content
- .replace(/{{VALUE}}/, value || "")
- .replace(/{{ERROR}}/, error ? `${error.message}
` : "")
+ response.content = response.content.replace(/{{ERROR}}/, error ? `${error.message}
` : "")
return this.replaceTemplates(route, response)
}
@@ -63,15 +61,12 @@ export class LoginHttpProvider extends HttpProvider {
return { code: HttpCode.Ok }
}
- let payload: LoginPayload | undefined
try {
const data = await this.getData(request)
- const p = data ? querystring.parse(data) : {}
- payload = p
-
- return await this.login(p, route, request)
+ const payload = data ? querystring.parse(data) : {}
+ return await this.login(payload, route, request)
} catch (error) {
- return this.getRoot(route, payload ? payload.password : undefined, error)
+ return this.getRoot(route, error)
}
}