[PR #92] [MERGED] Feature/unifi integration api #117

Closed
opened 2026-05-07 00:19:00 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/glenndehaan/unifi-voucher-site/pull/92
Author: @glenndehaan
Created: 8/27/2025
Status: Merged
Merged: 8/27/2025
Merged by: @glenndehaan

Base: masterHead: feature/unifi-integration-api


📝 Commits (8)

  • 68dd918 Refactored print.js, bulk-print.ejs, details.ejs, email.ejs, print.ejs, voucher.ejs and size.js for object compatibility with the UniFi Integration API. Updated the unifi.js module to implement the UniFi Integration API. Added the UNIFI_TOKEN to variables.js. Added fetch.js util. Check for undefined state in notes.js. Added undici to the dependencies. server.js refactored for compatibility with the UniFi integration API. Fixed incorrect quote filter within server.js. Temporary fixed guest mapping to voucher_code instead of ids
  • f36fa11 Refactored server.js into separate controllers. Implemented UNIFI_TOKEN startup check within info.js. Implemented KIOSK_HOMEPAGE environment variable. Implemented new / redirect structure base on KIOSK_HOMEPAGE variable. Implemented Admin UI button within kiosk.ejs. Updated array.js with new deprecated variables. Updated docker-compose.yml. Updated README.md.
  • 7af385c Updated info.js to show deprecation messages when utilizing the options.json. Added translation status to info.js. Implemented the TRANSLATION_HIDDEN_LANGUAGES, TASK_CLEANUP_EXPIRED and TASK_CLEANUP_UNUSED environment variables in variables.js. Updated language dropdown to hide themselves if the number of allowed languages is lower than 2. Added the created at field within details.ejs. Implemented cleanup.js for automatically cleaning-up expired and unused vouchers. Updated the languages.js util with global filters. Added country flags to languages.js. Updated docker-compose.yml. Dependency updates. Updated README.md. Lowered log intensity within server.js
  • 19d7e4c Refactor fetch.js to utilize global cache
  • 7b8a996 Removed old UniFi username check from info.js. Implemented temporary guest features warning in info.js. Cleanup unifi.js to remove legacy implementation and switch to UniFi Integrations. Removed deprecated UNIFI_USERNAME and UNIFI_PASSWORD from variables.js. Updated docker-compose.yml. Removed old dependencies. Updated README.md
  • c2d90c3 Updated README.md. Updated info.js guest warning
  • 09d2e24 Migrated languages.js from master
  • 39797a0 Merge remote-tracking branch 'origin/master' into feature/unifi-integration-api

📊 Changes

32 files changed (+1831 additions, -1519 deletions)

View changed files

.docs/images/integrations_example.png (+0 -0)
📝 README.md (+61 -14)
controllers/api.js (+247 -0)
controllers/authentication.js (+85 -0)
controllers/bulk.js (+111 -0)
controllers/error.js (+36 -0)
controllers/kiosk.js (+168 -0)
controllers/status.js (+37 -0)
controllers/voucher.js (+291 -0)
controllers/vouchers.js (+142 -0)
📝 docker-compose.yml (+6 -2)
📝 modules/cache.js (+4 -1)
📝 modules/info.js (+19 -3)
📝 modules/print.js (+16 -16)
📝 modules/unifi.js (+77 -222)
📝 modules/variables.js (+5 -2)
📝 package-lock.json (+135 -353)
📝 package.json (+5 -11)
📝 server.js (+56 -817)
📝 template/components/bulk-print.ejs (+15 -15)

...and 12 more files

📄 Description

No description provided


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/glenndehaan/unifi-voucher-site/pull/92 **Author:** [@glenndehaan](https://github.com/glenndehaan) **Created:** 8/27/2025 **Status:** ✅ Merged **Merged:** 8/27/2025 **Merged by:** [@glenndehaan](https://github.com/glenndehaan) **Base:** `master` ← **Head:** `feature/unifi-integration-api` --- ### 📝 Commits (8) - [`68dd918`](https://github.com/glenndehaan/unifi-voucher-site/commit/68dd918d3116a0c4b976d8f8aa2dcd70426a20b0) Refactored print.js, bulk-print.ejs, details.ejs, email.ejs, print.ejs, voucher.ejs and size.js for object compatibility with the UniFi Integration API. Updated the unifi.js module to implement the UniFi Integration API. Added the `UNIFI_TOKEN` to variables.js. Added fetch.js util. Check for undefined state in notes.js. Added undici to the dependencies. server.js refactored for compatibility with the UniFi integration API. Fixed incorrect quote filter within server.js. Temporary fixed guest mapping to voucher_code instead of ids - [`f36fa11`](https://github.com/glenndehaan/unifi-voucher-site/commit/f36fa1144a8f65f421cc887b4461da7d8f84d978) Refactored server.js into separate controllers. Implemented `UNIFI_TOKEN` startup check within info.js. Implemented `KIOSK_HOMEPAGE` environment variable. Implemented new / redirect structure base on `KIOSK_HOMEPAGE` variable. Implemented Admin UI button within kiosk.ejs. Updated array.js with new deprecated variables. Updated docker-compose.yml. Updated README.md. - [`7af385c`](https://github.com/glenndehaan/unifi-voucher-site/commit/7af385c8feff6929948dd13840edb3770e1a1e1a) Updated info.js to show deprecation messages when utilizing the options.json. Added translation status to info.js. Implemented the `TRANSLATION_HIDDEN_LANGUAGES`, `TASK_CLEANUP_EXPIRED` and `TASK_CLEANUP_UNUSED` environment variables in variables.js. Updated language dropdown to hide themselves if the number of allowed languages is lower than 2. Added the created at field within details.ejs. Implemented cleanup.js for automatically cleaning-up expired and unused vouchers. Updated the languages.js util with global filters. Added country flags to languages.js. Updated docker-compose.yml. Dependency updates. Updated README.md. Lowered log intensity within server.js - [`19d7e4c`](https://github.com/glenndehaan/unifi-voucher-site/commit/19d7e4c0c6967b44b4017d7728edc8bc4b6d7270) Refactor fetch.js to utilize global cache - [`7b8a996`](https://github.com/glenndehaan/unifi-voucher-site/commit/7b8a9964523306325aa6a9dbd5868da7a9cce57c) Removed old UniFi username check from info.js. Implemented temporary guest features warning in info.js. Cleanup unifi.js to remove legacy implementation and switch to UniFi Integrations. Removed deprecated `UNIFI_USERNAME` and `UNIFI_PASSWORD` from variables.js. Updated docker-compose.yml. Removed old dependencies. Updated README.md - [`c2d90c3`](https://github.com/glenndehaan/unifi-voucher-site/commit/c2d90c312c3e2e17f9e77fa17542a792c5892262) Updated README.md. Updated info.js guest warning - [`09d2e24`](https://github.com/glenndehaan/unifi-voucher-site/commit/09d2e24cdb60e56d0dd5ec6841da728148e3f50c) Migrated languages.js from master - [`39797a0`](https://github.com/glenndehaan/unifi-voucher-site/commit/39797a077d49b55436e7c3b06f8d3fef5015fbae) Merge remote-tracking branch 'origin/master' into feature/unifi-integration-api ### 📊 Changes **32 files changed** (+1831 additions, -1519 deletions) <details> <summary>View changed files</summary> ➕ `.docs/images/integrations_example.png` (+0 -0) 📝 `README.md` (+61 -14) ➕ `controllers/api.js` (+247 -0) ➕ `controllers/authentication.js` (+85 -0) ➕ `controllers/bulk.js` (+111 -0) ➕ `controllers/error.js` (+36 -0) ➕ `controllers/kiosk.js` (+168 -0) ➕ `controllers/status.js` (+37 -0) ➕ `controllers/voucher.js` (+291 -0) ➕ `controllers/vouchers.js` (+142 -0) 📝 `docker-compose.yml` (+6 -2) 📝 `modules/cache.js` (+4 -1) 📝 `modules/info.js` (+19 -3) 📝 `modules/print.js` (+16 -16) 📝 `modules/unifi.js` (+77 -222) 📝 `modules/variables.js` (+5 -2) 📝 `package-lock.json` (+135 -353) 📝 `package.json` (+5 -11) 📝 `server.js` (+56 -817) 📝 `template/components/bulk-print.ejs` (+15 -15) _...and 12 more files_ </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:19:00 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/unifi-voucher-site#117
No description provided.