web: switch to eslint
This commit is contained in:
		| @ -6,7 +6,7 @@ export class Client { | ||||
|     makeUrl(url: string[], query?: { [key: string]: string }): string { | ||||
|         let builtUrl = `/api/${VERSION}/${url.join("/")}/`; | ||||
|         if (query) { | ||||
|             let queryString = Object.keys(query) | ||||
|             const queryString = Object.keys(query) | ||||
|                 .map((k) => encodeURIComponent(k) + "=" + encodeURIComponent(query[k])) | ||||
|                 .join("&"); | ||||
|             builtUrl += `?${queryString}`; | ||||
| @ -20,10 +20,10 @@ export class Client { | ||||
|             .then((r) => { | ||||
|                 if (r.status > 300) { | ||||
|                     switch (r.status) { | ||||
|                         case 404: | ||||
|                             throw new NotFoundError(`URL ${finalUrl} not found`); | ||||
|                         default: | ||||
|                             throw new RequestError(r.statusText); | ||||
|                     case 404: | ||||
|                         throw new NotFoundError(`URL ${finalUrl} not found`); | ||||
|                     default: | ||||
|                         throw new RequestError(r.statusText); | ||||
|                     } | ||||
|                 } | ||||
|                 return r; | ||||
|  | ||||
| @ -21,7 +21,7 @@ export class Config { | ||||
|                     tracesSampleRate: 1.0, | ||||
|                     environment: config.error_reporting_environment, | ||||
|                 }); | ||||
|                 console.debug(`passbook/config: Sentry enabled.`); | ||||
|                 console.debug("passbook/config: Sentry enabled."); | ||||
|             } | ||||
|             return config; | ||||
|         }); | ||||
|  | ||||
							
								
								
									
										15
									
								
								web/src/api/policy_binding.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								web/src/api/policy_binding.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| export interface Policy { | ||||
|     pk: string; | ||||
|     name: string; | ||||
|     [key: string]: any; | ||||
| } | ||||
|  | ||||
| export interface PolicyBinding { | ||||
|     pk: string; | ||||
|     policy: string, | ||||
|     policy_obj: Policy; | ||||
|     target: string; | ||||
|     enabled: boolean; | ||||
|     order: number; | ||||
|     timeout: number; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer