1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 14:28:49 +09:00
This commit is contained in:
syuilo 2019-05-23 14:11:42 +09:00
parent 1e1a7ee858
commit 9c8d26affa
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 24 additions and 0 deletions

View File

@ -26,6 +26,8 @@
</details> </details>
</code> </code>
</div> </div>
<ui-button @click="deleteAll()">{{ $t('delete-all') }}</ui-button>
</section> </section>
</ui-card> </ui-card>
</div> </div>
@ -78,6 +80,15 @@ export default Vue.extend({
}).then(logs => { }).then(logs => {
this.logs = logs.reverse(); this.logs = logs.reverse();
}); });
},
deleteAll() {
this.$root.api('admin/delete-logs').then(() => {
this.$root.dialog({
type: 'success',
splash: true
});
});
} }
} }
}); });

View File

@ -0,0 +1,13 @@
import define from '../../define';
import { Logs } from '../../../../models';
export const meta = {
tags: ['admin'],
requireCredential: true,
requireModerator: true,
};
export default define(meta, async (ps) => {
await Logs.delete({});
});