-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from eugene-serb/dev
Release 1.26.0
- Loading branch information
Showing
16 changed files
with
356 additions
and
386 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import fetcher from '../core/fetcher'; | ||
import { announcementStorage } from '../models'; | ||
|
||
import type { CommonStorageController } from '../core'; | ||
import type { AnnouncementSavedData } from '@/models'; | ||
|
||
/** | ||
* Извлечь данные. | ||
* | ||
* @returns Данные. | ||
*/ | ||
function get(): AnnouncementSavedData[] { | ||
return fetcher.get<AnnouncementSavedData[]>(announcementStorage()); | ||
} | ||
|
||
/** | ||
* Записать данные. | ||
* | ||
* @param data Данные. | ||
*/ | ||
function set(data: AnnouncementSavedData[]): void { | ||
fetcher.set<AnnouncementSavedData[]>(data, announcementStorage()); | ||
} | ||
|
||
/** | ||
* Удалить данные. | ||
*/ | ||
function remove(): void { | ||
fetcher.remove<AnnouncementSavedData[]>(announcementStorage()); | ||
} | ||
|
||
/** | ||
* Контроллер хранилища данных Announcements. | ||
*/ | ||
const announcements: CommonStorageController<AnnouncementSavedData[]> = { | ||
get, | ||
set, | ||
remove, | ||
}; | ||
|
||
export default announcements; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as announcements } from './announcements'; |
Oops, something went wrong.