✨ Spotify OAuth & Presence
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using DysonNetwork.Pass.Account;
|
||||
using DysonNetwork.Pass.Account.Presences;
|
||||
using DysonNetwork.Pass.Credit;
|
||||
using DysonNetwork.Pass.Handlers;
|
||||
using DysonNetwork.Pass.Wallet;
|
||||
@@ -81,6 +83,16 @@ public static class ScheduledJobsConfiguration
|
||||
.ForJob(socialCreditValidationJob)
|
||||
.WithIdentity("SocialCreditValidationTrigger")
|
||||
.WithCronSchedule("0 0 0 * * ?"));
|
||||
|
||||
var spotifyPresenceUpdateJob = new JobKey("SpotifyPresenceUpdate");
|
||||
q.AddJob<SpotifyPresenceUpdateJob>(opts => opts.WithIdentity(spotifyPresenceUpdateJob));
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(spotifyPresenceUpdateJob)
|
||||
.WithIdentity("SpotifyPresenceUpdateTrigger")
|
||||
.WithSimpleSchedule(o => o
|
||||
.WithIntervalInMinutes(2)
|
||||
.RepeatForever())
|
||||
);
|
||||
});
|
||||
services.AddQuartzHostedService(q => q.WaitForJobsToComplete = true);
|
||||
|
||||
|
||||
@@ -57,12 +57,14 @@ public static class ServiceCollectionExtensions
|
||||
services.AddScoped<OidcService, MicrosoftOidcService>();
|
||||
services.AddScoped<OidcService, DiscordOidcService>();
|
||||
services.AddScoped<OidcService, AfdianOidcService>();
|
||||
services.AddScoped<OidcService, SpotifyOidcService>();
|
||||
services.AddScoped<GoogleOidcService>();
|
||||
services.AddScoped<AppleOidcService>();
|
||||
services.AddScoped<GitHubOidcService>();
|
||||
services.AddScoped<MicrosoftOidcService>();
|
||||
services.AddScoped<DiscordOidcService>();
|
||||
services.AddScoped<AfdianOidcService>();
|
||||
services.AddScoped<SpotifyOidcService>();
|
||||
|
||||
services.AddControllers().AddJsonOptions(options =>
|
||||
{
|
||||
@@ -142,6 +144,7 @@ public static class ServiceCollectionExtensions
|
||||
services.AddScoped<ActionLogService>();
|
||||
services.AddScoped<RelationshipService>();
|
||||
services.AddScoped<MagicSpellService>();
|
||||
services.AddScoped<DysonNetwork.Pass.Account.Presences.SpotifyPresenceService>();
|
||||
services.AddScoped<AuthService>();
|
||||
services.AddScoped<TokenAuthService>();
|
||||
services.AddScoped<AccountUsernameService>();
|
||||
|
||||
Reference in New Issue
Block a user