chore: format

This commit is contained in:
kusowl 2026-02-23 15:08:06 +05:30
parent 78bf326622
commit 4aba99fcb5
6 changed files with 18 additions and 20 deletions

View File

@ -1,4 +1,4 @@
export interface RegisterUserRequest{
export interface RegisterUserRequest {
name: string | null;
email: string | null;
mobile_number: string | null;

View File

@ -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<string>('API_URL', {
export const API_URL = new InjectionToken<string>("API_URL", {
providedIn: "root",
factory: () => environment.apiUrl
})
factory: () => environment.apiUrl,
});

View File

@ -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();
});
});

View File

@ -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);
}
}

View File

@ -1,4 +1,4 @@
export const environment = {
production: false,
apiUrl: 'http://localhost:8000/api',
production: false,
apiUrl: "http://localhost:8000/api",
};

View File

@ -1,4 +1,4 @@
export const environment = {
production: false,
apiUrl: 'http://my-dev-url',
production: false,
apiUrl: "http://my-dev-url",
};