Skip to content

Commit

Permalink
feat(match-service): basic service with locking
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAndersen committed Jun 15, 2024
1 parent d2bf588 commit b1e1499
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@boklisten/bl-connect",
"version": "0.19.21",
"version": "0.20.4",
"license": "MIT",
"scripts": {
"dev": "yarn serve",
Expand Down
2 changes: 1 addition & 1 deletion public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export * from "./src/app/document-services/user-detail/user-detail.service";

export * from "./src/app/document-services/company/company.service";

export * from "./src/app/document-services/match/match.service";
export * from "./src/app/matches/match.service";

export * from "./src/app/document-services/unique-item/unique-item.service";

Expand Down
2 changes: 1 addition & 1 deletion src/app/bl-connect/bl-connect.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import { OrderPdfService } from "../order-pdf/order-pdf.service";
import { MessageService } from "../document-services/message/message.service";
import { InvoiceService } from "../document-services/invoice/invoice.service";
import { CompanyService } from "../document-services/company/company.service";
import { MatchService } from "../document-services/match/match.service";
import { BookingService } from "../document-services/booking/booking.service";
import { UniqueItemService } from "../document-services/unique-item/unique-item.service";
import { SignatureService } from "../document-services/signature/signature.service";
import { MatchService } from "../matches/match.service";

export function tokenGetter() {
return localStorage.getItem(BL_CONFIG.token.accessToken);
Expand Down
17 changes: 0 additions & 17 deletions src/app/document-services/match/match.service.ts

This file was deleted.

30 changes: 30 additions & 0 deletions src/app/matches/match.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Injectable } from "@angular/core";
import { ApiService } from "../api/api.service";
import { BL_CONFIG } from "../bl-connect/bl-config";
import { ApiResponse } from "../api/api-response";
import { BlDocumentService } from "../document/bl-document.service";
import { Match } from "@boklisten/bl-model";
import { CachedDocumentService } from "../document/cached-document.service";

@Injectable({
providedIn: "root",
})
export class MatchService extends BlDocumentService<Match> {
constructor(
private cachedDocumentService: CachedDocumentService,
private _apiService: ApiService
) {
super(cachedDocumentService);
this.setCollection(BL_CONFIG.collection.match);
}

public updateLocksForCustomer(
customer: string,
lock: boolean
): Promise<ApiResponse> {
return this._apiService.add(BL_CONFIG.collection.match + "/lock", {
customer,
lock,
});
}
}

0 comments on commit b1e1499

Please sign in to comment.