mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
feat: create user endpoint
This commit is contained in:
@@ -4,9 +4,13 @@ import { Link as RouterLink } from "react-router-dom";
|
||||
import ListItem from "@material-ui/core/ListItem";
|
||||
import ListItemIcon from "@material-ui/core/ListItemIcon";
|
||||
import ListItemText from "@material-ui/core/ListItemText";
|
||||
import ListSubheader from "@material-ui/core/ListSubheader";
|
||||
import Divider from "@material-ui/core/Divider";
|
||||
import DashboardIcon from "@material-ui/icons/Dashboard";
|
||||
import WhatsAppIcon from "@material-ui/icons/WhatsApp";
|
||||
import SyncAltIcon from "@material-ui/icons/SyncAlt";
|
||||
import SettingsIcon from "@material-ui/icons/Settings";
|
||||
import GroupIcon from "@material-ui/icons/Group";
|
||||
|
||||
import ContactPhoneIcon from "@material-ui/icons/ContactPhone";
|
||||
|
||||
@@ -53,6 +57,18 @@ const MainListItems = () => {
|
||||
primary={i18n.t("mainDrawer.listItems.contacts")}
|
||||
icon={<ContactPhoneIcon />}
|
||||
/>
|
||||
<Divider />
|
||||
<ListSubheader inset>Administration</ListSubheader>
|
||||
<ListItemLink
|
||||
to="/chat"
|
||||
primary={i18n.t("mainDrawer.listItems.users")}
|
||||
icon={<GroupIcon />}
|
||||
/>
|
||||
<ListItemLink
|
||||
to="/chat"
|
||||
primary={i18n.t("mainDrawer.listItems.settings")}
|
||||
icon={<SettingsIcon />}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ const SignUp = () => {
|
||||
const handleSignUp = async e => {
|
||||
e.preventDefault();
|
||||
try {
|
||||
await api.post("/auth/signup", user);
|
||||
await api.post("/users", user);
|
||||
toast.success(i18n.t("signup.toasts.success"));
|
||||
history.push("/login");
|
||||
} catch (err) {
|
||||
|
||||
@@ -141,6 +141,9 @@ const messages = {
|
||||
connection: "Connection",
|
||||
tickets: "Tickets",
|
||||
contacts: "Contacts",
|
||||
administration: "Administration",
|
||||
users: "Users",
|
||||
settings: "Settings",
|
||||
},
|
||||
},
|
||||
messagesList: {
|
||||
|
||||
Reference in New Issue
Block a user