mirror of
https://github.com/hay-kot/homebox.git
synced 2025-05-29 16:42:31 +00:00
feat: change password (#35)
* refactor: implement factories for testing * add additional factories * change protection for dropFields * prevent timed attacks on login * use switch instead of else-if * API implementation for changing password * add change-password dialog
This commit is contained in:
parent
a6e3989aee
commit
a6d2fd45df
19 changed files with 458 additions and 149 deletions
|
@ -43,7 +43,7 @@ export class BaseAPI {
|
|||
* are present. This is useful for when you want to send a subset of fields to
|
||||
* the server like when performing an update.
|
||||
*/
|
||||
dropFields<T>(obj: T, keys: Array<keyof T> = []): T {
|
||||
protected dropFields<T>(obj: T, keys: Array<keyof T> = []): T {
|
||||
const result = { ...obj };
|
||||
[...keys, "createdAt", "updatedAt"].forEach(key => {
|
||||
// @ts-ignore - we are checking for the key above
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue