jitsu icon indicating copy to clipboard operation
jitsu copied to clipboard

Implement user settings storage on server side

Open Flyover-ArtSk opened this issue 2 years ago • 0 comments

Problem

For now we store user settings to local storage. localStorage is good for caching data, but never as a user settings storage.

Solution

Implement new api crud endpoint for working with user settings and user settings service that call api methods for storing settings

Interface for new service:

export type UserStorage<T = any> = {
  setItem(name: string, value: T, opts?: {ttlSeconds?: number}): Promise<void>;
  getItem(name: string): Promise<T>;
  removeItem(name: string): Promise<void>;
}

Flyover-ArtSk avatar Apr 19 '22 07:04 Flyover-ArtSk