Minor renames and rewordings

This commit is contained in:
Ske
2020-06-11 21:32:04 +02:00
parent 50c9675963
commit ccb6ba5d30
5 changed files with 32 additions and 25 deletions

View File

@@ -1,3 +1,3 @@
-- SCHEMA VERSION 6: 2020-03-21
alter table systems add column pings bool not null default true;
alter table systems add column pings_enabled bool not null default true;
update info set schema_version = 6;

View File

@@ -17,7 +17,7 @@ namespace PluralKit.Core {
[JsonIgnore] public string Token { get; set; }
[JsonProperty("created")] public Instant Created { get; set; }
[JsonProperty("tz")] public string UiTz { get; set; }
[JsonProperty("ping")] public bool Pings { get; set; }
[JsonProperty("ping")] public bool PingsEnabled { get; set; }
public PrivacyLevel DescriptionPrivacy { get; set; }
public PrivacyLevel MemberListPrivacy { get; set; }
public PrivacyLevel FrontPrivacy { get; set; }

View File

@@ -118,7 +118,7 @@ namespace PluralKit.Core {
public async Task SaveSystem(PKSystem system) {
using (var conn = await _conn.Obtain())
await conn.ExecuteAsync("update systems set name = @Name, description = @Description, tag = @Tag, avatar_url = @AvatarUrl, token = @Token, ui_tz = @UiTz, description_privacy = @DescriptionPrivacy, member_list_privacy = @MemberListPrivacy, front_privacy = @FrontPrivacy, front_history_privacy = @FrontHistoryPrivacy, pings = @Pings where id = @Id", system);
await conn.ExecuteAsync("update systems set name = @Name, description = @Description, tag = @Tag, avatar_url = @AvatarUrl, token = @Token, ui_tz = @UiTz, description_privacy = @DescriptionPrivacy, member_list_privacy = @MemberListPrivacy, front_privacy = @FrontPrivacy, front_history_privacy = @FrontHistoryPrivacy, pings_enabled = @PingsEnabled where id = @Id", system);
_logger.Information("Updated system {@System}", system);
await _cache.InvalidateSystem(system);