Logo
Explore Help
Register Sign In
External/fredy
1
0
Fork 0
You've already forked fredy
mirror of https://github.com/orangecoding/fredy.git synced 2026-06-16 12:31:07 +00:00
Code Issues Packages Projects Releases Wiki Activity
Files
04265eaec79bbc26a702fa50ec071f95e2c84776
fredy/test/mocks/mockStore.js

9 lines
273 B
JavaScript
Raw Normal View History

Concurrent-Jobs (#7) Fredy 2.0.0 introduces the concept of search jobs. You can now configure multiple of these jobs running in the same instance of Fredy. Also a new API has been created 🎉
2020-02-26 09:05:20 +01:00
const db = {};
Making Fredy an ESM project (#70) Making Fredy an ESM project
2023-03-13 13:42:43 +01:00
export const setKnownListings = (jobKey, providerId, listings) => {
Concurrent-Jobs (#7) Fredy 2.0.0 introduces the concept of search jobs. You can now configure multiple of these jobs running in the same instance of Fredy. Also a new API has been created 🎉
2020-02-26 09:05:20 +01:00
if (!Array.isArray(listings)) throw Error('Not a valid array');
db[providerId] = listings;
};
Making Fredy an ESM project (#70) Making Fredy an ESM project
2023-03-13 13:42:43 +01:00
export const getKnownListings = (jobKey, providerId) => {
Concurrent-Jobs (#7) Fredy 2.0.0 introduces the concept of search jobs. You can now configure multiple of these jobs running in the same instance of Fredy. Also a new API has been created 🎉
2020-02-26 09:05:20 +01:00
return db[providerId] || [];
};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 133ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API