This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/models/linkShare.js
konrad 2d8c43a920
All checks were successful
continuous-integration/drone/push Build is passing
Add link share password authentication (#466)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #466
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-04-11 13:18:19 +00:00

32 lines
618 B
JavaScript

import AbstractModel from './abstractModel'
import UserModel from './user'
export default class ListModel extends AbstractModel {
constructor(data) {
// The constructor of AbstractModel handles all the default parsing.
super(data)
this.sharedBy = new UserModel(this.sharedBy)
this.created = new Date(this.created)
this.updated = new Date(this.updated)
}
// Default attributes that define the "empty" state.
defaults() {
return {
id: 0,
hash: '',
right: 0,
sharedBy: UserModel,
sharingType: 0,
listId: 0,
name: '',
password: '',
created: null,
updated: null,
}
}
}