chore: lint and fmt
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { data } from '@/data/data'
|
||||
import { DataType } from '@/data/DataType.enum'
|
||||
import { AtprotoSession } from '@/data/models/AtprotoSession'
|
||||
import { data } from "@/data/data"
|
||||
import { DataType } from "@/data/DataType.enum"
|
||||
import { AtprotoSession } from "@/data/models/AtprotoSession"
|
||||
|
||||
const SESSION_ID = `${DataType.AtprotoSession}-current`
|
||||
|
||||
@@ -8,12 +8,15 @@ export const loadSession = (): Promise<AtprotoSession | null> => {
|
||||
return data.get<DataType.AtprotoSession, AtprotoSession>(SESSION_ID)
|
||||
}
|
||||
|
||||
export const saveSession = async (did: string, handle: string): Promise<void> => {
|
||||
export const saveSession = async (
|
||||
did: string,
|
||||
handle: string
|
||||
): Promise<void> => {
|
||||
const session: AtprotoSession = {
|
||||
_id: SESSION_ID,
|
||||
$type: DataType.AtprotoSession,
|
||||
did,
|
||||
handle,
|
||||
handle
|
||||
}
|
||||
await data.update<DataType.AtprotoSession, AtprotoSession>(session)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user