Migrace na OpenAPI - TypeScript typy

This commit is contained in:
2025-03-05 21:05:21 +01:00
parent d144c55bf7
commit d69e09afee
40 changed files with 1295 additions and 550 deletions

View File

@@ -15,7 +15,7 @@ const STORAGE_KEY = 'voting';
* @returns pole voleb
*/
export async function getUserVotes(login: string) {
const data: VotingData = await storage.getData(STORAGE_KEY);
const data = await storage.getData<VotingData>(STORAGE_KEY);
return data?.[login] || [];
}
@@ -28,7 +28,7 @@ export async function getUserVotes(login: string) {
* @returns aktuální data
*/
export async function updateFeatureVote(login: string, option: FeatureRequest, active: boolean): Promise<VotingData> {
let data: VotingData = await storage.getData(STORAGE_KEY);
let data = await storage.getData<VotingData>(STORAGE_KEY);
if (data == null) {
data = {};
}