mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-04 00:30:27 +00:00
change protection for dropFields
This commit is contained in:
parent
0120e197ca
commit
0c57a34325
1 changed files with 1 additions and 1 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