mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-13 09:04:04 +01:00
Added API part and tests
This commit is contained in:
@@ -7,16 +7,36 @@ export default {
|
||||
releaseSelection(data) {
|
||||
return repository.post('/amavis/quarantine/release_selection/', data)
|
||||
},
|
||||
releaseMessage(mailid, data) {
|
||||
return repository.post(`/amavis/quarantine/${mailid}/release/`, data)
|
||||
},
|
||||
deleteSelection(data) {
|
||||
return repository.post('/amavis/quarantine/delete_selection/', data)
|
||||
},
|
||||
deleteMessage(mailid, data) {
|
||||
return repository.post(`/amavis/quarantine/${mailid}/delete/`, data)
|
||||
},
|
||||
markMessageSelection(data) {
|
||||
return repository.post('/amavis/quarantine/mark_selection/', data)
|
||||
},
|
||||
getMessageContent(mailid, rcpt) {
|
||||
return repository.get(`/amavis/quarantine/${mailid}/?rcpt=${rcpt}`)
|
||||
getMessageContent(mailid, rcpt, secretId) {
|
||||
const params = { rcpt }
|
||||
if (secretId) {
|
||||
params.secret_id = secretId
|
||||
}
|
||||
return repository.get(`/amavis/quarantine/${mailid}/`, { params })
|
||||
},
|
||||
getMessageHeaders(mailid) {
|
||||
return repository.get(`/amavis/quarantine/${mailid}/headers/`)
|
||||
getMessageHeaders(mailid, rcpt, secretId) {
|
||||
const params = { rcpt }
|
||||
if (secretId) {
|
||||
params.secret_id = secretId
|
||||
}
|
||||
return repository.get(`/amavis/quarantine/${mailid}/headers/`, { params })
|
||||
},
|
||||
getDomainPolicy(domainId) {
|
||||
return repository.get(`/amavis/policies/${domainId}/`)
|
||||
},
|
||||
updateDomainPolicy(domainId, data) {
|
||||
return repository.patch(`/amavis/policies/${domainId}/`, data)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import repository from './repository'
|
||||
|
||||
export default {
|
||||
getNotifications() {
|
||||
return repository.get('/notifications/')
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user