aboutsummaryrefslogtreecommitdiff
path: root/src/background/repositories/find.js
blob: 6656c58e44dce88c8107f02c0a0c88119fbd90a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import MemoryStorage from '../infrastructures/memory-storage';

const FIND_KEYWORD_KEY = 'find-keyword';

export default class FindRepository {
  constructor() {
    this.cache = new MemoryStorage();
  }

  getKeyword() {
    return Promise.resolve(this.cache.get(FIND_KEYWORD_KEY));
  }

  setKeyword(keyword) {
    this.cache.set(FIND_KEYWORD_KEY, keyword);
    return Promise.resolve();
  }
}