feat: function attribute typing
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
import AbstractService from './abstractService'
|
||||
|
||||
export default class AccountDeleteService extends AbstractService {
|
||||
request(password) {
|
||||
return this.post('/user/deletion/request', {password: password})
|
||||
request(password: string) {
|
||||
return this.post('/user/deletion/request', {password})
|
||||
}
|
||||
|
||||
confirm(token) {
|
||||
return this.post('/user/deletion/confirm', {token: token})
|
||||
confirm(token: string) {
|
||||
return this.post('/user/deletion/confirm', {token})
|
||||
}
|
||||
|
||||
cancel(password) {
|
||||
return this.post('/user/deletion/cancel', {password: password})
|
||||
cancel(password: string) {
|
||||
return this.post('/user/deletion/cancel', {password})
|
||||
}
|
||||
}
|
@ -22,9 +22,9 @@ export default class BackgroundUploadService extends AbstractService {
|
||||
* @param file
|
||||
* @returns {Promise<any|never>}
|
||||
*/
|
||||
create(listId, file) {
|
||||
create(listId: ListModel['id'], file) {
|
||||
return this.uploadFile(
|
||||
this.getReplacedRoute(this.paths.create, {listId: listId}),
|
||||
this.getReplacedRoute(this.paths.create, {listId}),
|
||||
file,
|
||||
'background',
|
||||
)
|
||||
|
@ -2,11 +2,11 @@ import AbstractService from './abstractService'
|
||||
import {downloadBlob} from '../helpers/downloadBlob'
|
||||
|
||||
export default class DataExportService extends AbstractService {
|
||||
request(password) {
|
||||
return this.post('/user/export/request', {password: password})
|
||||
request(password: string) {
|
||||
return this.post('/user/export/request', {password})
|
||||
}
|
||||
|
||||
async download(password) {
|
||||
async download(password: string) {
|
||||
const clear = this.setLoading()
|
||||
try {
|
||||
const url = await this.getBlobUrl('/user/export/download', 'POST', {password})
|
||||
|
Reference in New Issue
Block a user