mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
fixed file name for serverless persistent store
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
// This should be only used on the server side, where the tokens are stored with KV store using
|
||||
// a file system based storage. The tokens are stored in the file system as JSON at /tmp path.
|
||||
import os from 'os'
|
||||
|
||||
import Keyv from 'keyv'
|
||||
import { KeyvFile } from 'keyv-file'
|
||||
|
||||
const kv = new Keyv({
|
||||
store: new KeyvFile(),
|
||||
store: new KeyvFile({
|
||||
filename: `${os.tmpdir()}/od-auth-token.json`,
|
||||
}),
|
||||
})
|
||||
|
||||
export async function storeOdAuthTokens({
|
||||
|
||||
Reference in New Issue
Block a user