Skip to content
Toggle navigation
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this user
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
{{ message }}
regalijan
/
car-crushers-portal
Public
Notifications
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
0
Security
Insights
More
Code
Issues
Pull requests
Actions
Projects
Security
Insights
Permalink
car-crushers-portal
/
functions
/
api
/
appeals
/
_middleware.ts
Newer
Older
Raw
Normal view
History
100644
7 lines (5 sloc)
213 Bytes
Greatly reduce repeated code
October 19, 2023 16:50
1
import
{
jsonError
}
from
"../../common.js"
;
2
Create login check middleware for all appeals api routes
October 19, 2023 16:49
3
export
async
function
onRequest
(
context
:
RequestContext
)
{
Greatly reduce repeated code
October 19, 2023 16:50
4
if
(
!
context
.
data
.
current_user
)
return
jsonError
(
"Not logged in"
,
401
)
;
Create login check middleware for all appeals api routes
October 19, 2023 16:49
5
6
return
await
context
.
next
(
)
;
7
}
You can’t perform that action at this time.