~bigbes/core-go

12000f491a3aadf43210c1a0124b3d4406866da1 — Drew DeVault 3 years ago 236879a
Revert "auth: Use canonical user IDs"

This reverts commit 6c1036e2705d93e1cb71476ac78499ae27f0d326.
1 files changed, 3 insertions(+), 4 deletions(-)

M auth/middleware.go
M auth/middleware.go => auth/middleware.go +3 -4
@@ 337,7 337,6 @@ func FetchMetaProfile(ctx context.Context, username string, user *AuthContext) e
			INSERT INTO "user" (
				created,
				updated,
				id,
				username,
				email,
				user_type,


@@ 349,7 348,7 @@ func FetchMetaProfile(ctx context.Context, username string, user *AuthContext) e
			VALUES (
				NOW() at time zone 'utc',
				NOW() at time zone 'utc',
				$1, $2, $3, $4, $5, $6, $7, $8
				$1, $2, $3, $4, $5, $6, $7
			)
			ON CONFLICT DO NOTHING
			RETURNING


@@ 363,8 362,8 @@ func FetchMetaProfile(ctx context.Context, username string, user *AuthContext) e
				location,
				bio,
				suspension_notice;`,
			profile.ID, profile.Username, profile.Email, ut, profile.URL,
			profile.Location, profile.Bio, profile.SuspensionNotice)
			&profile.Username, &profile.Email, &ut, &profile.URL,
			&profile.Location, &profile.Bio, &profile.SuspensionNotice)

		// TODO: Register webhooks
		if err := row.Scan(&user.UserID, &user.Created, &user.Updated,