Skip to content

Commit

Permalink
sonarcloud
Browse files Browse the repository at this point in the history
Co-Authored-By: Karina Sanchez <[email protected]>
  • Loading branch information
Holyvert and KarinaSandur committed Apr 12, 2024
1 parent 611c4fa commit 36896dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/app/pages/building-info/bookings/bookings.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Component, Input } from '@angular/core';
import { FormGroup, Validators, FormBuilder } from '@angular/forms';
import { getDatabase } from 'firebase/database';
import {
Booking,
Building,
Facilities,
TimesAvailable,
} from 'src/app/models/properties';
import { User } from 'src/app/models/users';
import { MyErrorStateMatcher } from 'src/app/services/auth.service';
import { AuthService } from 'src/app/services/auth.service';
import { AuthService, MyErrorStateMatcher } from 'src/app/services/auth.service';
import { BookingsService } from 'src/app/services/bookings.service';
import { BuildingService } from 'src/app/services/building.service';
import { NotificationService } from 'src/app/services/notification.service';
Expand Down Expand Up @@ -189,7 +187,7 @@ export class BookingsComponent {
this.date = dateObject.valueOf();


const db = getDatabase();


const booking: Booking = {
ID: '',
Expand Down
6 changes: 2 additions & 4 deletions src/app/services/bookings.service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Injectable } from '@angular/core';
import { Booking, Building } from '../models/properties';
import { get, getDatabase, ref, set } from 'firebase/database';
import { Booking } from '../models/properties';
import { getDatabase} from 'firebase/database';
import { StorageService } from 'src/app/services/storage.service';
import { BuildingService } from './building.service';
import { String } from 'cypress/types/lodash';
import { UserService } from './user.service';
import { AuthService } from './auth.service';

Expand Down Expand Up @@ -71,7 +70,6 @@ export class BookingsService {
*/
async removeBooking(buildingID: string, bookingID: string): Promise<void> {
try {
const db = getDatabase();
const building = await this.buildingService.getBuilding(buildingID);

if (!building.Bookings) {
Expand Down
1 change: 0 additions & 1 deletion src/app/services/building.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
ParkingLockerStatus,
ParkingSpot,
ParkingType,
TimeSlots
} from '../models/properties';
import { getDatabase } from 'firebase/database';

Expand Down

0 comments on commit 36896dd

Please sign in to comment.