forked from verdnatura/salix-front
Merge pull request 'feat(AccountConnections): use VnToken' (!471) from 7547-accessToken-security into dev
Reviewed-on: verdnatura/salix-front#471 Reviewed-by: Pablo Natek <pablone@verdnatura.es>
This commit is contained in:
commit
9e94cb2d36
|
@ -27,15 +27,15 @@ const filter = {
|
||||||
order: 'created DESC',
|
order: 'created DESC',
|
||||||
};
|
};
|
||||||
|
|
||||||
const urlPath = 'AccessTokens';
|
const urlPath = 'VnTokens';
|
||||||
|
|
||||||
const refresh = () => paginateRef.value.fetch();
|
const refresh = () => paginateRef.value.fetch();
|
||||||
|
|
||||||
const navigate = (id) => router.push({ name: 'AccountSummary', params: { id } });
|
const navigate = (id) => router.push({ name: 'AccountSummary', params: { id } });
|
||||||
|
|
||||||
const killSession = async (id) => {
|
const killSession = async ({ userId, created }) => {
|
||||||
try {
|
try {
|
||||||
await axios.delete(`${urlPath}/${id}`);
|
await axios.post(`${urlPath}/killSession`, { userId, created });
|
||||||
paginateRef.value.fetch();
|
paginateRef.value.fetch();
|
||||||
notify(t('Session killed'), 'positive');
|
notify(t('Session killed'), 'positive');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -84,7 +84,7 @@ const killSession = async (id) => {
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
t('Session will be killed'),
|
t('Session will be killed'),
|
||||||
t('Are you sure you want to continue?'),
|
t('Are you sure you want to continue?'),
|
||||||
() => killSession(row.id)
|
() => killSession(row)
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
outline
|
outline
|
||||||
|
|
Loading…
Reference in New Issue