Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Wolfgang Knopki
Spacedeck-open-SAML
Commits
f6cfef89
Commit
f6cfef89
authored
5 years ago
by
mntmn
Committed by
mntmn
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
allow looking up spaces via slug
parent
b99ec300
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
middlewares/space_helpers.js
+6
-1
middlewares/space_helpers.js
with
6 additions
and
1 deletion
+6
-1
middlewares/space_helpers.js
+
6
-
1
View file @
f6cfef89
'
use strict
'
;
const
db
=
require
(
'
../models/db
'
);
const
{
Op
}
=
require
(
"
sequelize
"
);
var
config
=
require
(
'
config
'
);
module
.
exports
=
(
req
,
res
,
next
)
=>
{
...
...
@@ -53,8 +54,12 @@ module.exports = (req, res, next) => {
'
email
'
:
1
};
// find space by id or slug
db
.
Space
.
findOne
({
where
:
{
"
_id
"
:
spaceId
[
Op
.
or
]:
[
{
"
_id
"
:
spaceId
},
{
"
edit_slug
"
:
spaceId
}
]
}}).
then
(
function
(
space
)
{
if
(
space
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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