User search and creation
This commit is contained in:
parent
5fa9e6efd6
commit
0458e11267
7 changed files with 109 additions and 42 deletions
|
@ -2,11 +2,13 @@ const Entry = require(`./object.JS`);
|
|||
const Hash = require(`../../utilities/hash.JS`);
|
||||
|
||||
class User extends Entry {
|
||||
// Default properties
|
||||
name;
|
||||
ID;
|
||||
activated = false;
|
||||
passcode;
|
||||
/*
|
||||
Default properties:
|
||||
name
|
||||
ID
|
||||
activated = false
|
||||
passcode
|
||||
*/
|
||||
#login = false;
|
||||
|
||||
constructor(PROPERTIES) {
|
||||
|
@ -40,15 +42,8 @@ class User extends Entry {
|
|||
"ID": {"type": String, "required": true, "unique": true, "dropDups": true},
|
||||
"activated": {"type": Boolean},
|
||||
"passcode": {"type": String}
|
||||
}
|
||||
let TEST = new User();
|
||||
|
||||
// Verify that the schema is valid.
|
||||
Object.keys(SCHEMA).forEach((KEY) => {
|
||||
if (!Object.keys(TEST).includes(KEY)) {delete SCHEMA[KEY];};
|
||||
});
|
||||
|
||||
return (SCHEMA)
|
||||
};
|
||||
return (SCHEMA);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue