mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
* [web] Add User logs to Group Audit Logs view GitOrigin-RevId: c455edc5a700ba24e73a16b2a66b50cb92f24176
36 lines
677 B
JavaScript
36 lines
677 B
JavaScript
/* eslint-disable no-unused-vars */
|
|
|
|
import Helpers from './lib/helpers.mjs'
|
|
|
|
const tags = ['saas']
|
|
|
|
const indexes = [
|
|
{
|
|
key: {
|
|
managedSubscriptionId: 1,
|
|
timestamp: 1,
|
|
},
|
|
name: 'managedSubscriptionId_1_timestamp_1',
|
|
},
|
|
]
|
|
|
|
const migrate = async client => {
|
|
const { db } = client
|
|
await Helpers.addIndexesToCollection(db.userAuditLogEntries, indexes)
|
|
}
|
|
|
|
const rollback = async client => {
|
|
const { db } = client
|
|
try {
|
|
await Helpers.dropIndexesFromCollection(db.userAuditLogEntries, indexes)
|
|
} catch (err) {
|
|
console.error('Something went wrong rolling back the migrations', err)
|
|
}
|
|
}
|
|
|
|
export default {
|
|
tags,
|
|
migrate,
|
|
rollback,
|
|
}
|