aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/data/rest_ds.dart
diff options
context:
space:
mode:
authorMarvin Borner2018-07-21 17:59:36 +0200
committerMarvin Borner2018-07-21 17:59:36 +0200
commitf03f214a47a78a52d73e28a76eec78d3f10d07e5 (patch)
treeeaaf280fa5b89d32018236e06e1fc22220b8fa80 /lib/data/rest_ds.dart
parentacc5d5e9e960db9525a4368b393cb97fab8658e7 (diff)
Rewritten login activity
Diffstat (limited to 'lib/data/rest_ds.dart')
-rw-r--r--lib/data/rest_ds.dart22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/data/rest_ds.dart b/lib/data/rest_ds.dart
deleted file mode 100644
index 36a82c7..0000000
--- a/lib/data/rest_ds.dart
+++ /dev/null
@@ -1,22 +0,0 @@
-import 'dart:async';
-import 'dart:convert'; // not needed for later use
-
-import 'package:beam_messenger/utils/network_util.dart';
-import 'package:beam_messenger/models/user.dart';
-
-class RestDatasource {
- NetworkUtil _netUtil = new NetworkUtil();
- static final baseUrl = "http://192.168.0.74:8000";
- static final loginUrl = baseUrl + "/login";
-
- Future<User> login(String email, String password) {
- return _netUtil.post(loginUrl,
- body: {"email": email, "password": password}).then((dynamic res) {
- print(res.toString());
- if (res["status"]) throw new Exception(res["message"]);
- return jsonDecode(
- "{ error: false, user: { email: “marvin@borners.de”, password: “password” } }"); // later: access token
- // return new User.map(res["user"]);
- });
- }
-}