User search and creation

This commit is contained in:
buzz-lightsnack-2007 2025-04-07 22:24:00 +08:00
parent 5fa9e6efd6
commit 0458e11267
7 changed files with 109 additions and 42 deletions

View file

@ -1,10 +1,13 @@
const Entry = require(`./object.JS`);
class Activity extends Entry {
username;
description;
duration;
date;
/*
Default properties:
username
description
duration
date
*/
constructor(PROPERTIES) {
super(PROPERTIES);
@ -21,15 +24,8 @@ class Activity extends Entry {
"description": {"type": String},
"date": {"type": Number},
"duration": {"type": Number}
}
let TEST = new Activity();
// Verify that the schema is valid.
Object.keys(SCHEMA).forEach((KEY) => {
if (!Object.keys(TEST).includes(KEY)) {delete SCHEMA[KEY];};
});
return (SCHEMA)
};
return (SCHEMA);
}
}