20 lines
330 B
JavaScript
20 lines
330 B
JavaScript
/**
|
|
* Returns valid db schema
|
|
*/
|
|
export const dbSchema = (userList) => {
|
|
return {
|
|
version: '1.0.0',
|
|
userList,
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Returns valid user schema
|
|
*/
|
|
export const userSchema = (entry) => {
|
|
return {
|
|
lastError: entry.lastError,
|
|
lastUpdated: entry.lastUpdated,
|
|
pastUsernames: entry.pastUsernames,
|
|
}
|
|
}
|