mirror of
https://github.com/sasjs/server.git
synced 2026-01-15 01:40:05 +00:00
feat(api): added autoexec + major type setting changes
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
export const desktopRestrict = (req: any, res: any, next: any) => {
|
||||
import { RequestHandler } from 'express'
|
||||
|
||||
export const desktopRestrict: RequestHandler = (req, res, next) => {
|
||||
const { MODE } = process.env
|
||||
if (MODE?.trim() !== 'server')
|
||||
return res.status(403).send('Not Allowed while in Desktop Mode.')
|
||||
|
||||
next()
|
||||
}
|
||||
export const desktopUsername = (req: any, res: any, next: any) => {
|
||||
export const desktopUsername: RequestHandler = (req, res, next) => {
|
||||
const { MODE } = process.env
|
||||
if (MODE?.trim() !== 'server')
|
||||
return res.status(200).send({
|
||||
|
||||
Reference in New Issue
Block a user