foundersandcoders / open-tourism-platform

An open platform to facilitate the creation of apps to promote local tourism and business in Nazareth
MIT License
17 stars 3 forks source link

add views relating to auth and OAuth #104

Open mattlub opened 7 years ago

mattlub commented 7 years ago

high priority:

lower priority:

@des-des @m4v15 thoughts on the endpoints I've suggested?

m4v15 commented 7 years ago

@JWLD @mattlub Just wanted to make you aware that currently, the post request to /register expects a particular kind of body, like this:

    const { englishName, arabicName, email, username, imageUrl } = req.body
    const en = englishName && { name: englishName }
    const ar = arabicName && { name: arabicName }
    return Users.create(Object.assign(
      {
        username: username,
        password: passwordHash,
        role: roles.BASIC,
        email: email,
        imageUrl: imageUrl
      },
      { ar },
      { en }
    ))

we can allow for organisation name as englishOrgNam and arabicOrgName (didn't do it originally but am going to do it before the PR is finished

m4v15 commented 7 years ago

Those endpoints look good to me - you know what each form is POST ing to as well yeah?

m4v15 commented 7 years ago

Are we going to get rid of the user endpoints on the API?

Or I guess we always said we'd just secure these for only SUPER

des-des commented 7 years ago

@mattlub they look good.

des-des commented 7 years ago

scope done for this sprint