mirror of
https://github.com/myfatemi04/wheelshare-old-backend.git
synced 2025-04-18 10:50:18 -04:00
feat: added marker functionality
This commit is contained in:
parent
afc7f05e78
commit
43a0317a3b
|
@ -34,12 +34,16 @@ router.post('/', async (req, res) => {
|
|||
const userID = req.session.accountID;
|
||||
const poolID = req.body.pool;
|
||||
const location = req.body.location;
|
||||
const lat = req.body.lat;
|
||||
const lng = req.body.lng;
|
||||
|
||||
const address = new AddressModel();
|
||||
Object.assign(address, {
|
||||
user: userID,
|
||||
pool: poolID,
|
||||
location: location,
|
||||
lat: lat,
|
||||
lng: lng,
|
||||
});
|
||||
address
|
||||
.save()
|
||||
|
|
|
@ -83,12 +83,16 @@ export interface Address extends Document {
|
|||
user: string;
|
||||
pool: string;
|
||||
location: string;
|
||||
lat: string;
|
||||
lng: string;
|
||||
}
|
||||
|
||||
const AddressSchema: Schema = new Schema({
|
||||
user: { type: String, required: true },
|
||||
pool: { type: String, required: true },
|
||||
location: { type: String, required: true },
|
||||
lat: { type: String, required: true },
|
||||
lng: { type: String, required: true },
|
||||
});
|
||||
|
||||
const AddressModel: Model<Pool> = model('Address', AddressSchema);
|
||||
|
|
Loading…
Reference in New Issue
Block a user