diff options
Diffstat (limited to 'server/lib/redis.ts')
-rw-r--r-- | server/lib/redis.ts | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/server/lib/redis.ts b/server/lib/redis.ts index f9cea57cd..d052de786 100644 --- a/server/lib/redis.ts +++ b/server/lib/redis.ts | |||
@@ -145,18 +145,10 @@ class Redis { | |||
145 | return this.setValue(this.generateIPViewKey(ip, videoUUID), '1', VIEW_LIFETIME.VIEW) | 145 | return this.setValue(this.generateIPViewKey(ip, videoUUID), '1', VIEW_LIFETIME.VIEW) |
146 | } | 146 | } |
147 | 147 | ||
148 | setIPVideoViewer (ip: string, videoUUID: string) { | ||
149 | return this.setValue(this.generateIPViewerKey(ip, videoUUID), '1', VIEW_LIFETIME.VIEWER_COUNTER) | ||
150 | } | ||
151 | |||
152 | async doesVideoIPViewExist (ip: string, videoUUID: string) { | 148 | async doesVideoIPViewExist (ip: string, videoUUID: string) { |
153 | return this.exists(this.generateIPViewKey(ip, videoUUID)) | 149 | return this.exists(this.generateIPViewKey(ip, videoUUID)) |
154 | } | 150 | } |
155 | 151 | ||
156 | async doesVideoIPViewerExist (ip: string, videoUUID: string) { | ||
157 | return this.exists(this.generateIPViewerKey(ip, videoUUID)) | ||
158 | } | ||
159 | |||
160 | /* ************ Tracker IP block ************ */ | 152 | /* ************ Tracker IP block ************ */ |
161 | 153 | ||
162 | setTrackerBlockIP (ip: string) { | 154 | setTrackerBlockIP (ip: string) { |
@@ -361,10 +353,6 @@ class Redis { | |||
361 | return `views-${videoUUID}-${ip}` | 353 | return `views-${videoUUID}-${ip}` |
362 | } | 354 | } |
363 | 355 | ||
364 | private generateIPViewerKey (ip: string, videoUUID: string) { | ||
365 | return `viewer-${videoUUID}-${ip}` | ||
366 | } | ||
367 | |||
368 | private generateTrackerBlockIPKey (ip: string) { | 356 | private generateTrackerBlockIPKey (ip: string) { |
369 | return `tracker-block-ip-${ip}` | 357 | return `tracker-block-ip-${ip}` |
370 | } | 358 | } |