-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed the redundant ios prefixes from the ios notifications directory
- Loading branch information
1 parent
283f9d8
commit c7a6956
Showing
22 changed files
with
100 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
ls: | ||
.dir: snake_case | ||
.dir: lowercase | ||
.pb.gw.go: snake_case | ||
.pb.go: snake_case | ||
.go: snake_case | ||
|
||
ignore: | ||
- venv | ||
- server/swagger/node_modules | ||
- .idea | ||
- .git | ||
- .github | ||
- .vscode | ||
- apns_auth_key.p8 | ||
- swagger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
package cron | ||
|
||
import ( | ||
"github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_device" | ||
"github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_devices_activity_reset" | ||
"github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_scheduled_update_log" | ||
"github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_scheduling" | ||
"github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/device" | ||
"github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/devices_activity_reset" | ||
"github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/scheduled_update_log" | ||
"github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/scheduling" | ||
) | ||
|
||
// Starts the cron job for sending iOS notifications reuses | ||
// the APNs client (ios_apns.Service) stored in CronService | ||
// the APNs client (apns.Service) stored in CronService | ||
func (c *CronService) iosNotificationsCron() error { | ||
if !c.APNs.IsActive { | ||
return nil | ||
} | ||
|
||
repo := ios_scheduling.NewRepository(c.db) | ||
devicesRepo := ios_device.NewRepository(c.db) | ||
schedulerRepo := ios_scheduled_update_log.NewRepository(c.db) | ||
repo := scheduling.NewRepository(c.db) | ||
devicesRepo := device.NewRepository(c.db) | ||
schedulerRepo := scheduled_update_log.NewRepository(c.db) | ||
|
||
service := ios_scheduling.NewService(repo, devicesRepo, schedulerRepo, c.APNs) | ||
service := scheduling.NewService(repo, devicesRepo, schedulerRepo, c.APNs) | ||
|
||
return service.HandleScheduledCron() | ||
} | ||
|
||
// Resets the activity of all devices to 0 every day, week, month or year | ||
func (c *CronService) iosActivityReset() error { | ||
service := ios_devices_activity_reset.NewService(c.db) | ||
service := devices_activity_reset.NewService(c.db) | ||
|
||
return service.HandleScheduledActivityReset() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ifications/ios_crypto/encrypted_string.go → ..._notifications/crypto/encrypted_string.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tions/ios_device/ios_device_repository.go → ...notifications/device/device_repository.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package ios_device | ||
package device | ||
|
||
import ( | ||
"errors" | ||
|
4 changes: 2 additions & 2 deletions
4
...ications/ios_device/ios_device_service.go → ...os_notifications/device/device_service.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../ios_devices_activity_reset_repository.go → ...eset/devices_activity_reset_repository.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package ios_devices_activity_reset | ||
package devices_activity_reset | ||
|
||
import ( | ||
"time" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.