style: fix linting issues met Prettier
This commit is contained in:
		
							parent
							
								
									fc5a40ba40
								
							
						
					
					
						commit
						9b0c0c9889
					
				
					 11 changed files with 43 additions and 45 deletions
				
			
		|  | @ -1,4 +1,4 @@ | |||
| import {API_BASE} from "../../config.ts"; | ||||
| import { API_BASE } from "../../config.ts"; | ||||
| 
 | ||||
| export class BaseController { | ||||
|     protected baseUrl: string; | ||||
|  | @ -12,7 +12,9 @@ export class BaseController { | |||
|         if (queryParams) { | ||||
|             const query = new URLSearchParams(); | ||||
|             Object.entries(queryParams).forEach(([key, value]) => { | ||||
|                 if (value !== undefined && value !== null) {query.append(key, value.toString());} | ||||
|                 if (value !== undefined && value !== null) { | ||||
|                     query.append(key, value.toString()); | ||||
|                 } | ||||
|             }); | ||||
|             url += `?${query.toString()}`; | ||||
|         } | ||||
|  | @ -68,5 +70,4 @@ export class BaseController { | |||
| 
 | ||||
|         return res.json(); | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| import {StudentController} from "@/controllers/student-controller.ts"; | ||||
| import {TeacherController} from "@/controllers/teacher-controller.ts"; | ||||
| import { StudentController } from "@/controllers/student-controller.ts"; | ||||
| import { TeacherController } from "@/controllers/teacher-controller.ts"; | ||||
| 
 | ||||
| export function controllerGetter<T>(Factory: new () => T): () => T { | ||||
|     let instance: T | undefined; | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| import {BaseController} from "@/controllers/base-controller.ts"; | ||||
| import { BaseController } from "@/controllers/base-controller.ts"; | ||||
| 
 | ||||
| export class StudentController extends BaseController { | ||||
|     constructor() { | ||||
|  | @ -40,5 +40,4 @@ export class StudentController extends BaseController { | |||
|     getQuestions(username: string, full = true) { | ||||
|         return this.get<{ questions: any[] }>(`/${username}/questions`, { full }); | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| import {BaseController} from "@/controllers/base-controller.ts"; | ||||
| import { BaseController } from "@/controllers/base-controller.ts"; | ||||
| 
 | ||||
| export class TeacherController extends BaseController { | ||||
|     constructor() { | ||||
|  |  | |||
		Reference in a new issue
	
	 Lint Action
						Lint Action