- setIPVideoView (ip: string, videoUUID: string) {
- return this.setValue(this.buildViewKey(ip, videoUUID), '1', VIDEO_VIEW_LIFETIME)
+ /* ************ Contact form per IP ************ */
+
+ async setContactFormIp (ip: string) {
+ return this.setValue(this.generateContactFormKey(ip), '1', CONTACT_FORM_LIFETIME)
+ }
+
+ async doesContactFormIpExist (ip: string) {
+ return this.exists(this.generateContactFormKey(ip))
+ }
+
+ /* ************ Views per IP ************ */
+
+ setIPVideoView (ip: string, videoUUID: string, isLive: boolean) {
+ const lifetime = isLive
+ ? VIEW_LIFETIME.LIVE
+ : VIEW_LIFETIME.VIDEO
+
+ return this.setValue(this.generateViewKey(ip, videoUUID), '1', lifetime)
+ }
+
+ async doesVideoIPViewExist (ip: string, videoUUID: string) {
+ return this.exists(this.generateViewKey(ip, videoUUID))