feat: page locale migration + deps update
This commit is contained in:
@@ -98,9 +98,10 @@ module.exports = {
|
||||
},
|
||||
async migrateToLocale(obj, args, context) {
|
||||
try {
|
||||
|
||||
const count = await WIKI.models.pages.migrateToLocale(args)
|
||||
return {
|
||||
responseResult: graphHelper.generateSuccess('Migrated all content to target locale successfully.')
|
||||
responseResult: graphHelper.generateSuccess('Migrated content to target locale successfully.'),
|
||||
count
|
||||
}
|
||||
} catch (err) {
|
||||
return graphHelper.generateError(err)
|
||||
|
@@ -77,7 +77,7 @@ type PageMutation {
|
||||
migrateToLocale(
|
||||
sourceLocale: String!
|
||||
targetLocale: String!
|
||||
): DefaultResponse @auth(requires: ["manage:system"])
|
||||
): PageMigrationResponse @auth(requires: ["manage:system"])
|
||||
}
|
||||
|
||||
# -----------------------------------------------
|
||||
@@ -89,6 +89,11 @@ type PageResponse {
|
||||
page: Page
|
||||
}
|
||||
|
||||
type PageMigrationResponse {
|
||||
responseResult: ResponseStatus!
|
||||
count: Int
|
||||
}
|
||||
|
||||
type Page {
|
||||
id: Int!
|
||||
path: String!
|
||||
|
Reference in New Issue
Block a user