Add Feedback domain module: public submission flow, admin CRUD, reporting (#7)
Jenkins Production Deployment

Co-authored-by: Patrick Müller <mail@pmueller.me>
Reviewed-on: #7
Co-authored-by: Patrick Mueller <patrick@mueller-patrick.tech>
Co-committed-by: Patrick Mueller <patrick@mueller-patrick.tech>
This commit was merged in pull request #7.
This commit is contained in:
2026-08-23 09:39:02 +00:00
committed by Patrick Müller
parent e7621b8290
commit b05f6b9da0
38 changed files with 4115 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
import {hashIp} from '../../src/models/feedback/feedback.ratelimit';
describe('hashIp', () => {
it('never returns the raw IP', () => {
const hash = hashIp('203.0.113.42');
expect(hash).not.toContain('203.0.113.42');
});
it('is deterministic for the same input', () => {
expect(hashIp('203.0.113.42')).toBe(hashIp('203.0.113.42'));
});
it('differs for different inputs', () => {
expect(hashIp('203.0.113.42')).not.toBe(hashIp('203.0.113.43'));
});
it('is a 64-char hex SHA-256 digest', () => {
expect(hashIp('203.0.113.42')).toMatch(/^[0-9a-f]{64}$/);
});
});