diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-01-26 14:51:36 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-01-26 14:52:57 +0100 |
commit | d3bf2d09f740221771806789b00bf915c9f5f2e3 (patch) | |
tree | 95f99eabd763dff1907f107393504ee75aa747d7 /mobile/app/main-view-model.ts | |
parent | 466d03a38cb01e9ff9a2d11be113a81c2bdce34a (diff) |
Diffstat (limited to 'mobile/app/main-view-model.ts')
-rw-r--r-- | mobile/app/main-view-model.ts | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/mobile/app/main-view-model.ts b/mobile/app/main-view-model.ts deleted file mode 100644 index 714abe1..0000000 --- a/mobile/app/main-view-model.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Frame, Http, Observable } from '@nativescript/core'; - -export class LoginModel extends Observable { - public server: string = 'http://192.168.178.59:8080'; - public username: string; - public password: string; - - constructor() { - super(); - } - - async onLogin() { - const content = new FormData(); - content.append('username', this.username); - content.append('password', this.password); - const response = await Http.request({ - url: this.server, - method: 'POST', - content: content, - }); - - console.log(response.content?.toString()); - } - - goToGalleries() { - const frame = Frame.topmost(); - frame.navigate('gallery-page'); - } -} |