@ -24,7 +24,7 @@ export default class RateLimiter {
|
||||
/**
|
||||
* timeSpan in seconds
|
||||
*/
|
||||
public static timeSpan = 600
|
||||
public static timeSpan = 60
|
||||
|
||||
private static instance: RateLimiter = new RateLimiter()
|
||||
public static getInstance(): RateLimiter {
|
||||
|
@ -6,10 +6,12 @@ import { objectLoop } from '@dzeio/object-util'
|
||||
export default class ResponseBuilder {
|
||||
|
||||
private _body: BodyInit | null | undefined
|
||||
public body(body: string | object | null | undefined) {
|
||||
if (typeof body === 'object') {
|
||||
public body(body: string | Buffer | object | null | undefined) {
|
||||
if (typeof body === 'object' && !(body instanceof Buffer)) {
|
||||
this._body = JSON.stringify(body)
|
||||
this.addHeader('Content-Type', 'application/json')
|
||||
} else if (body instanceof Buffer) {
|
||||
this._body = body.toString()
|
||||
} else {
|
||||
this._body = body
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import DaoFactory from '../models/DaoFactory'
|
||||
import CookieManager from './CookieManager'
|
||||
import { buildRFC7807 } from './RFCs/RFC7807'
|
||||
|
||||
interface Permission {
|
||||
export interface Permission {
|
||||
name: string
|
||||
/**
|
||||
* if set it will be usable by users
|
||||
|
Reference in New Issue
Block a user