Update viewer.tsx (#2106)
parent
ec97971e7d
commit
d98731d50a
|
@ -634,7 +634,7 @@ const loggedInViewerRouter = createProtectedRouter()
|
|||
if (username !== user.username) {
|
||||
data.username = username;
|
||||
const response = await checkUsername(username);
|
||||
if (!response.available) {
|
||||
if (!response.available || response.premium) {
|
||||
throw new TRPCError({ code: "BAD_REQUEST", message: response.message });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue