This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Asynchronous Recursive Request retry with Axios | |
Author: Dimosthenis Kalaitzis <[email protected]> | |
Requires Axios | |
Throws error after failing all available attempts | |
@param requestParams AxiosRequestOptions | |
@param attempts number | |
*/ | |
async sendRequest(requestParams, attempts = 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { SetMetadata } from '@nestjs/common'; | |
export interface SelfDecoratorParams { | |
userIDParam: string; | |
allowAdmins?: boolean; | |
} | |
export const Self = (params: SelfDecoratorParams | string) => | |
SetMetadata( | |
'selfParams', |