const m = require('mithril');

const Admin = module.exports = function (data = {}) {
  this.id = m.prop(data.adminId);
  this.username = m.prop(data.username);
  this.password = m.prop(data.password);
  this.email = m.prop(data.email);
  this.permissions = m.prop(data.permissions);
};

Admin.login = (admin) =>
    m.request({
      method: 'POST',
      url: '../api/admins/login',
      data: {
        username: admin.username(),
        password: admin.password()
      }
    });

@@ -106,15 +106,20 @@
 ata.
-adminId
+userId %7C%7C ''
 );%0A 
@@ -155,16 +155,22 @@
 username
+ %7C%7C ''
 );%0A  thi
@@ -202,16 +202,22 @@
 password
+ %7C%7C ''
 );%0A  thi
@@ -243,16 +243,22 @@
 ta.email
+ %7C%7C ''
 );%0A  thi
@@ -296,16 +296,22 @@
 missions
+ %7C%7C %5B%5D
 );%0A%7D;%0A%0AA

Add default values for admin model properties