Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
559b8ae8
Unverified
Commit
559b8ae8
authored
May 01, 2022
by
myml
Committed by
GitHub
Apr 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: undefined author in git commit when deleting a page (#5215)
parent
485aa765
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
pages.js
server/models/pages.js
+1
-9
No files found.
server/models/pages.js
View file @
559b8ae8
...
...
@@ -787,15 +787,7 @@ module.exports = class Page extends Model {
* @returns {Promise} Promise with no value
*/
static
async
deletePage
(
opts
)
{
let
page
if
(
_
.
has
(
opts
,
'id'
))
{
page
=
await
WIKI
.
models
.
pages
.
query
().
findById
(
opts
.
id
)
}
else
{
page
=
await
WIKI
.
models
.
pages
.
query
().
findOne
({
path
:
opts
.
path
,
localeCode
:
opts
.
locale
})
}
const
page
=
await
WIKI
.
models
.
pages
.
getPageFromDb
(
_
.
has
(
opts
,
'id'
)
?
opts
.
id
:
opts
);
if
(
!
page
)
{
throw
new
WIKI
.
Error
.
PageNotFound
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment