mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 00:53:14 +00:00
small change
This commit is contained in:
@@ -33,23 +33,17 @@ export async function getDocs(): Promise<Doc[] | null> {
|
||||
export async function getLocalApiKey(): Promise<string | null> {
|
||||
try {
|
||||
const key = localStorage.getItem('DocsGPTApiKey');
|
||||
if (key) {
|
||||
return key;
|
||||
}
|
||||
return null;
|
||||
return key;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export async function getLocalRecentDocs(): Promise<Doc | null> {
|
||||
export async function getLocalRecentDocs(): Promise<string | null> {
|
||||
try {
|
||||
const doc = localStorage.getItem('DocsGPTRecentDocs');
|
||||
if (doc) {
|
||||
return JSON.parse(doc);
|
||||
}
|
||||
return null;
|
||||
return doc;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user