Skip to content

Commit

Permalink
Merge branch 'master' into fixRemoveOwner
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfang97 authored Jan 14, 2025
2 parents 6663e72 + 6304492 commit 9bd5201
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/api/datatables.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,16 @@ function collectionMembersDatatable (req, res) {
]).then((result) => {
const [count, filterCount, members] = result

const uniqueMembers = members.filter(
(item, index, self) =>
index === self.findIndex((t) => t.uri === item.uri)
)

res.header('content-type', 'application/json').send(JSON.stringify({
draw: parseInt(req.query.draw),
recordsTotal: count,
recordsFiltered: filterCount,
data: members.map((member) => {
data: uniqueMembers.map((member) => {
var memberUrl = uriToUrl(member.uri)
if (member.uri.toString().startsWith(config.get('databasePrefix') + 'user/')) {
if (req.headers.referer.toString().endsWith('/share')) {
Expand Down
3 changes: 3 additions & 0 deletions lib/views/admin/sparql.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ function form (req, res, locals) {

graphs = graphs.filter(result => result.startsWith(config.get('triplestore').graphPrefix))

// Alphabetize the filtered graphs
graphs.sort((a, b) => a.localeCompare(b))

return Promise.all(
graphs.map((graph) => graphInfo(graph))
)
Expand Down

0 comments on commit 9bd5201

Please sign in to comment.