aboutsummaryrefslogtreecommitdiffstats
path: root/lib/migrate.ts
blob: 58623ec1f6cdf427659ae4b243e0eb6902718da6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import { g } from "$lib/db";

async function migrate(id) {
  const k = id?.replace(/\s/g, "").toLowerCase();
  let user = await g(`user:${k}`);
  if (typeof user === "string") user = await g(`user:${user}`);
  return user;
}

export default migrate;