import { Injectable } from '@nestjs/common';
import { StateRepository } from './state.repository';

@Injectable()
export class StateService {
  constructor(private readonly repository: StateRepository) {}

  get(ownerId: string, key: string) {
    return this.repository.get(ownerId, key);
  }

  set(ownerId: string, key: string, value: unknown) {
    return this.repository.upsert(ownerId, key, value);
  }
}
