From 4aba99fcb51bf7485db74ab73a45d79a3d639a84 Mon Sep 17 00:00:00 2001 From: kusowl Date: Mon, 23 Feb 2026 15:08:06 +0530 Subject: [PATCH] chore: format --- src/app/core/models/user.model.ts | 2 +- src/app/core/tokens/api-url-tokens.ts | 8 ++++---- src/app/features/auth/services/auth-service.spec.ts | 8 ++++---- src/app/features/auth/services/auth-service.ts | 12 +++++------- src/environments/environment.development.ts | 4 ++-- src/environments/environment.ts | 4 ++-- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/app/core/models/user.model.ts b/src/app/core/models/user.model.ts index 096b3cc..578a5ec 100644 --- a/src/app/core/models/user.model.ts +++ b/src/app/core/models/user.model.ts @@ -1,4 +1,4 @@ -export interface RegisterUserRequest{ +export interface RegisterUserRequest { name: string | null; email: string | null; mobile_number: string | null; diff --git a/src/app/core/tokens/api-url-tokens.ts b/src/app/core/tokens/api-url-tokens.ts index 854a927..a672e81 100644 --- a/src/app/core/tokens/api-url-tokens.ts +++ b/src/app/core/tokens/api-url-tokens.ts @@ -1,7 +1,7 @@ import { InjectionToken } from "@angular/core"; -import {environment} from '../../../environments/environment'; +import { environment } from "../../../environments/environment"; -export const API_URL = new InjectionToken('API_URL', { +export const API_URL = new InjectionToken("API_URL", { providedIn: "root", - factory: () => environment.apiUrl -}) + factory: () => environment.apiUrl, +}); diff --git a/src/app/features/auth/services/auth-service.spec.ts b/src/app/features/auth/services/auth-service.spec.ts index ef933a9..430c262 100644 --- a/src/app/features/auth/services/auth-service.spec.ts +++ b/src/app/features/auth/services/auth-service.spec.ts @@ -1,8 +1,8 @@ -import { TestBed } from '@angular/core/testing'; +import { TestBed } from "@angular/core/testing"; -import { AuthService } from './auth-service'; +import { AuthService } from "./auth-service"; -describe('AuthService', () => { +describe("AuthService", () => { let service: AuthService; beforeEach(() => { @@ -10,7 +10,7 @@ describe('AuthService', () => { service = TestBed.inject(AuthService); }); - it('should be created', () => { + it("should be created", () => { expect(service).toBeTruthy(); }); }); diff --git a/src/app/features/auth/services/auth-service.ts b/src/app/features/auth/services/auth-service.ts index e61b363..58509b8 100644 --- a/src/app/features/auth/services/auth-service.ts +++ b/src/app/features/auth/services/auth-service.ts @@ -1,13 +1,12 @@ -import { Injectable, inject } from '@angular/core'; -import { RegisterUserRequest } from '../../../core/models/user.model'; -import { HttpClient } from '@angular/common/http'; -import { API_URL } from '../../../core/tokens/api-url-tokens'; +import { Injectable, inject } from "@angular/core"; +import { RegisterUserRequest } from "../../../core/models/user.model"; +import { HttpClient } from "@angular/common/http"; +import { API_URL } from "../../../core/tokens/api-url-tokens"; @Injectable({ - providedIn: 'root', + providedIn: "root", }) export class AuthService { - private http: HttpClient = inject(HttpClient); private apiUrl = inject(API_URL); @@ -15,5 +14,4 @@ export class AuthService { console.log(this.apiUrl); return this.http.post(`${this.apiUrl}/register`, userRequest); } - } diff --git a/src/environments/environment.development.ts b/src/environments/environment.development.ts index 9449fd4..f2f0c5a 100644 --- a/src/environments/environment.development.ts +++ b/src/environments/environment.development.ts @@ -1,4 +1,4 @@ export const environment = { - production: false, - apiUrl: 'http://localhost:8000/api', + production: false, + apiUrl: "http://localhost:8000/api", }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 562aa74..255654a 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -1,4 +1,4 @@ export const environment = { - production: false, - apiUrl: 'http://my-dev-url', + production: false, + apiUrl: "http://my-dev-url", };