mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
chore: refactor getPersistedTables
This commit is contained in:
parent
8ba81e5c87
commit
8da6342bde
@ -92,13 +92,15 @@ async function removePersistedTables({ strapi }, tableNames) {
|
||||
* @param {Strapi} ctx.strapi
|
||||
* @returns {Promise<string[]>}
|
||||
*/
|
||||
const getPersistedTables = async ({ strapi }) =>
|
||||
(
|
||||
await strapi.store.get({
|
||||
type: 'core',
|
||||
key: 'persisted_tables',
|
||||
})
|
||||
).map(transformTableName) ?? [];
|
||||
|
||||
async function getPersistedTables({ strapi }) {
|
||||
const persistedTables = await strapi.store.get({
|
||||
type: 'core',
|
||||
key: 'persisted_tables',
|
||||
});
|
||||
|
||||
return (persistedTables || []).map(transformTableName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all table names that start with a prefix to the reserved tables in
|
||||
|
Loading…
x
Reference in New Issue
Block a user