Update login pipeline. Limit login to only password
This commit is contained in:
@@ -40,13 +40,6 @@ export const handler: BunextAPIRouteHandler<APIResponseObject> = async (
|
||||
}
|
||||
|
||||
try {
|
||||
if (
|
||||
user_types.find((ty) => ty.user_type == "read_only") &&
|
||||
!req.method.match(/get/)
|
||||
) {
|
||||
throw new Error(`This user can only read records.`);
|
||||
}
|
||||
|
||||
const [table, id] = params.query.paths.split("/") as [
|
||||
TableType,
|
||||
string | number,
|
||||
@@ -63,10 +56,6 @@ export const handler: BunextAPIRouteHandler<APIResponseObject> = async (
|
||||
};
|
||||
|
||||
switch (table) {
|
||||
case "users":
|
||||
return await users(crud_params);
|
||||
case "user_types":
|
||||
return await userTypes(crud_params);
|
||||
case "media":
|
||||
return await media(crud_params);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user