added 260907 version of worker toolkit

This commit is contained in:
2026-09-08 20:30:51 -04:00
parent cbd3f0f8ca
commit 97aca37663
1283 changed files with 142951 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'flaredown/mixins/authenticated-route-mixin';
const {
get,
Route,
} = Ember;
export default Route.extend(AuthenticatedRouteMixin, {
model() {
return get(this, 'store').findAll('pattern');
},
});

View File

@@ -0,0 +1,21 @@
import Ember from 'ember';
import config from 'flaredown/config/environment';
import CryptoJS from 'cryptojs';
const {
get,
Route,
} = Ember;
export default Route.extend({
secretPhrase: config.encryptionSecret,
staticUrl: config.staticUrl,
model(params) {
const friendlyUrl = decodeURIComponent(params.friendly_id);
const decryptedArray = CryptoJS.AES.decrypt(friendlyUrl, get(this, 'secretPhrase')).toString(CryptoJS.enc.Utf8);
const patternIds = decryptedArray.split(', ').map((id) => id.replace(/\s+/g,""));
return get(this, 'store').query('pattern', { pattern_ids: patternIds });
},
});