mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-19 00:42:29 +08:00
client-ts: Port services/validation_error
This commit is contained in:
parent
380f4a1d54
commit
3fbedfb0a1
@ -1,7 +0,0 @@
|
|||||||
export default class ValidationError {
|
|
||||||
constructor(resp) {
|
|
||||||
for (const key in resp) {
|
|
||||||
this[key] = resp[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
7
src/public/app/services/validation_error.ts
Normal file
7
src/public/app/services/validation_error.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export default class ValidationError {
|
||||||
|
constructor(resp: Record<string, string | number>) {
|
||||||
|
for (const key in resp) {
|
||||||
|
(this as any)[key] = resp[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user